Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Changing an icon's image when selected (pressed)

(0) ShareShare
ReportReport
Posted on by 72

Hello all, 

 

Is there a way that when an icon is pressed it changes its 'image'?

 

I'm trying to have a lock icon that when pressed it becomes an unlocked icon and vice versa.

 

Thanks in advance!

  • Verified answer
    Pstork1 Profile Picture
    67,039 Most Valuable Professional on at
    Re: Changing an icon's image when selected (pressed)

    Add an Icon to your screen. Set the OnSelect to the following

    Set(varlocked, Not(varlocked))

    set the Icon property to the following.

    If(varlocked,Icon.Lock,Icon.Unlock)

    The OnSelect will toggle between the two states whenever the icon is clicked and the Icon property will show the Locked or unlocked icon based on the state.

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1