Showing results for 
Search instead for 
Did you mean: 

Horizontal Flexible Width Gallery

I always wondered why there was a vertical flexible height gallery but not a horizontal flexible width gallery in the list of galleries that you can insert in your apps... 🤔

Image 3.png

Anyway... I think that lots of people (me included 😊) would love to have an Horizontal Flexible Width Gallery. This would allow us to create column headers for vertical galleries, or toolbars with buttons, etc.


Status: New
Frequent Visitor

Can't you already set the width of horizontal galleries 'cells' by manipulating the Template Size value?Screenshot 2020-05-20 at 17.28.11.png

Super User

Hi @rvanraamsdonk,

I'm afraid not. The template size property is mainly used by the "fixed" horizontal and flexible galleries to the set the size of the template for ALL items in the gallery. You cannot use it in a horizontal gallery to have various sizes to gallery's "cells".

That is why Power Apps provides a flexible height gallery control which automatically resizes each cell to its content (meaning that the TemplateSize property in that case is not really relevant).

Resident Rockstar



I was looking for the same option in PowerApps.


To provide a use case here:

Let say I use a vertical gallery to create a DataTable like list. In there I have to put all kinds of controls (labels, icons, images) to show the user the record attributes. When I would like to change the width and ordering of those controls I have to manually reorder them. 

With a horizontal flexible width gallery I would be able to add this gallery to my vertical gallery. Put all the desired controls into the gallery.template and provide a schema to the gallery to set-up the proper controls.

Even I could add an option for the user to re-arrange the ordering of the fields and set the visibility to make my interface more dynamic. 

Btw, would be nice when the Gallery.OnSelect could be set to Select(Parent) and it would select the parent of the gallery (instead of the parent is the gallery itself)

@Anonymous could you maybe add the right person in the team to this threat? Thanks.

New Member

@R3dKap and @KroonOfficeSol 

Did you try using dynamic width? The below example uses dynamic "Y" position of a button that is below a dynamic height label element and I believe you could use similar code to set up dynamic "width" for your controls. Can't you?


Button.Y = LabelDescription.Y+LabelDescription.Height+20


See the first screenshots "Get the resource" button below a dynamic height label control. When description copy length changes or if there is no description, it automatically adjusts it's Y position vertically using the code above.


The "Get the resource" button's Y position is adjusted dynamically using forumla above so it shows below the varying height label controlThe "Get the resource" button's Y position is adjusted dynamically using forumla above so it shows below the varying height label control




When there is no description, the dynamic Y position of button moves upWhen there is no description, the dynamic Y position of button moves up




Resident Rockstar

@adityabajaj_  , we are talking about a vertical gallery here and your pictures show us a horizontal gallery. The thing is that a vertical gallery the template width is based on the first template, so when you calculate a width this will be the first record in your vertical gallery.

The thought is here that you could


  • make a tab control with a vertical gallery where the separate tabs are of different size.
  • Add a vertical gallery to a horizontal gallery. Provide the vertical gallery with a JSON schema which renders the controls you like to see. Think of a gallery in where you put in a label, image, icon, etc. and then provide a schema like:


    {Type: "Label", Value: ThisItem.Value, Width: 200}
    ,{Type: "Image", Value: ThisItem.Value, Width: Parent.TemplateHeight}
    ,{Type: "Icon", Value: ThisItem.Value, Width: Parent.TemplateHeight}



This would render a label, a square image and a square Icon.

Another advantage here could be that you can create a gallery based on the user's preference.

Hope this all makes sense.