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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Make things visible an...
Power Apps
Answered

Make things visible and invisible with buttons (BrowseGallery)

(0) ShareShare
ReportReport
Posted on by 28

Hello,

 

I have a Gallery with 3 buttons (men, woman and child) in a gallery. When I press one button it should make the other buttons a bit lighter and the button pressed a bit darker. When I press an other button that button should be darker and the others should be lighter.

 

What I'm searching is a way to let a button do things when it is pressed in a gallery. Most post say to make a variable, with a gallery that won't work because then all te buttons would change when only the set of buttons from that item should change. Below a picture of my app:

KoenLSN_0-1646943334193.png

 

Already thank for the help!

 

Categories:
I have the same question (0)
  • zmorek Profile Picture
    3,272 on at

    You could put a horizontal gallery inside that vertical gallery, and give the Items property of the horizontal gallery something like:

     

    Table({Title: "Men", Color: Blue}, {Title: "Women", Color:Pink}, {Title:"Child", Color: Green}).

     

    Then put a button in the horizontal gallery, set the Text property to ThisItem.Title.

     

    Then you can set the Fill property of the buttons in the horizontal gallery to something like:

     

    If(!ThisItem.IsSelected,ColorFade(ThisItem.Color,50%),ThisItem.Color)

     

    image.png

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Here is another example.

     

    I have a gallery and in it I placed 3 circles (Give each one a tooltip of Circle1, Circle2, Circle3, etc. In something with a text propertty this is unnecessary as you can reference that but I wanted to use shapes for my example) so each item in the gallery has 3 circles (can be anything, button shape etc etc)

     

    Each one has an OnSelect of

     

     

    Switch(
     CountRows(Filter(ButtonTest,Item=ThisItem.ID)),
     0, Collect(ButtonTest,{Item:ThisItem.ID, Choice:Self.Tooltip}),
     RemoveIf(ButtonTest,Item=ThisItem.ID);
     Collect(ButtonTest,{Item:ThisItem.ID, Choice:Self.Tooltip}))

     

     

     

    And each one has a fill of

     

     

     

    If(
     LookUp(ButtonTest, Item=ThisItem.ID,Choice)=Self.Tooltip,
     RGBA(54, 176, 75, 1),
     RGBA(54, 176, 75, .2))

     

     

    selectexample.PNG

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard