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 / Changing an icon's ima...
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!

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,417 Most Valuable Professional on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard