web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Changing Color of Sele...
Power Apps
Unanswered

Changing Color of Selected Item's Icon In Gallery

(0) ShareShare
ReportReport
Posted on by 58

I currently have an Icon in a gallery and a button outside of the gallery and I want the button to change the color of the icon when pressed. 

 

I also only want the item selected in the gallery's Icon to change colors.

 

Any ideas?

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @jNelly 

    in the button: UpdateContext({clr:true}) or

    toggled button: UpdateContext(clr:!clr})

    in the icon color property: If(ThisItem.IsSelected && clr, Red, Blue)

  • jNelly Profile Picture
    58 on at

    Okay so that changed the color of the icon to red which is good but I want the items icon that was selected when the button was pushed to stay red.

     

    Because now when I click on another item it automatically changes its color to red before I push the button and the old item I had selected when I pushed the button changes back to blue.

  • jNelly Profile Picture
    58 on at

    If it helps I could update a column from my data source named status by the push of the button to change the color for the selected item I just need help doing that. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @jNelly,

    Do you want to make the icon of the selected item change colour when you click a button outside the Gallery?

     

    If you could accept adding a column like Status to make difference, that's would be easier to achieve your need.

    1). Add a Text column to your list

    2). Once you select an item from the Gallery, click the button to update the corresponding status as Color. Set the Onselect property of the button outside the gallery as below:

    Patch(ListName,Gallery9.Selected,{Status:"Color"})
    

    3). Make the Fill property of the icon as below:

    If(ThisItem.Status="Color",Red)

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard