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 / Adjust position of ico...
Power Apps
Unanswered

Adjust position of icon dynamically in powerapps gallery

(0) ShareShare
ReportReport
Posted on by 603

I am using powerapp gallery with SharePoint as the datasource.

 

I need to prefix the star symbol at the top of each label in gallery as per below screenshot. Star symbol is shown in red color. 

 

However based on the length of each label, I need to adjust the position of star accordingly so that it is prefixed properly.

 

Currently for the first row, first column, star symbol is hidden by label. Any idea how to adjust position of star dynamically? 

Iantaylor2050_0-1686764316951.png

 

Categories:
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Iantaylor2050 ,

     

    Well its not ideal solution, I'd recommend you can put start at the top left to indicate required. 

    But if you still want to do, then you have to do the tweaking as per your App.

     

    So, When word is short

    Ethan_R_0-1686774915811.png

     

    And when it reaches max position:

    Ethan_R_1-1686774925355.png

     

     

    After that it won't extend further:

     

    Here's how I did:

    If(
     (TextInput1.X + TextInput1.Width/2) - Len(TextInput1.Text)*4.5 < 983, 983, (TextInput1.X + TextInput1.Width/2) - Len(TextInput1.Text)*4.5
    )

     

    Breaking down the code:

    (TextInput1.X + TextInput1.Width/2): Determines the position where Star has to start which is Midway of the box or control
    Len(TextInput1.Text)*4.5: This is a number that will reduce based on length of text multiplying based on font-size used. [Tweaking necessary)
    983: is basically my last stop of the column, as you text can be more than expected, so your Star shouldn't go beyond that.
     
    Hope this helps 

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
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard