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 / Flexible height horizo...
Power Apps
Answered

Flexible height horizontal gallery

(0) ShareShare
ReportReport
Posted on by 109

Hi, 

Assuming the screen initially looks like this - 

MJK_0-1596661136130.png

After I click on "Add Rows" button a row is added in the gallery,  the "Per day total" text boxes and the "Submit Timesheet" & "Add Rows" buttons are re-positioned accordingly.

 

MJK_1-1596661473809.png

 

So on after a couple clicks(Add Rows) the screen should look like this - 

MJK_2-1596661818324.png

 

My Question is- 

How do I create a flexible height horizontal gallery ? And along with it how do I achieve re-positioning controls as the size of the gallery increases?

 Thank you 

Categories:
  • MJK Profile Picture
    109 on at

    @WarrenBelz, @jlindstrom, @mdevaney, @v-xida-msft 

    Looking for some help here. Can Something like this be achieved ?

  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @MJK ,

    It is called a Flexible Height gallery as it relates to a Vertical gallery (or is would be a Flexible Width gallery).

    You can of course make a width conditional on other entries with the X property.

    ItemToTheLeft.X + ItemToTheLeft.Width

    and cascade this across.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Joel CustomerEffective Profile Picture
    3,224 on at

    See https://powerusers.microsoft.com/t5/Building-Power-Apps/dynamically-adding-a-row-to-a-horizontal-gallery/m-p/634364/highlight/true#M201178

     

    Isn’t this the same thing you posted there and have you tried his recommendation? It seems like what you are trying to do

  • MJK Profile Picture
    109 on at

    @jlindstrom 

    No it isn't, and yes I did implement that solution successfully and can add a new row on button click. But if you look at that solution the height of the gallery doesn't change(the yellow part) and the "Add Row" button position is fixed at the bottom. 

     

    My requirement is to increase the height of the gallery as the rows are added and move the "Add Row" button accordingly.(plz refer to the screenshot in my first post)

  • Verified answer
    WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    @MJK ,

    I see what you need now - I was focused on your Horizontal gallery question.

    You can conditionally set the Y Property of the buttons - will need a bit of trial and error on the mathematics, but something like

    GalleryName.Y + CountRows(GalleryName.AllItems)*(GalleryName.TemplateHeight + GalleryName.TemplatePadding) + xxx

    where xxx is the space you want below the gallery.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • MJK Profile Picture
    109 on at

    @WarrenBelz 

    Works perfectly, Thanks!

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard