cancel
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.

@R3dKap 

Status: New
Comments
rvanraamsdonk
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

R3dKap
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).

KroonOfficeSol
Resident Rockstar

Hi,

 

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.

adityabajaj_
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

 

 

image.png

KroonOfficeSol
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:

 

Table(
    {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.

dgDHG
Advocate I

@KroonOfficeSol 

 

I did not follow your example. Could you provide some additional clarity / images.

 

I to require a flexible width horizontal gallery to mimic Windows Explorer's own directory breadcrumb:

 

dgDHG_0-1635269006323.png

 

arpost
Advocate III

Really, REALLY hope this gets added with Microsoft’s new responsive features. I have hit this wall multiple times in my apps, and I need a fix. I’ve used other no-code tools from MUCH smaller companies than Microsoft that offer this feature with CSS Flexbox. Hope MS does. 

MasterRA
Advocate I

This is very necessary and not only to create horizontal menus; in my case I need to show an indicator of the number of records depending on a data type and each one according to its status, I use a horizontal gallery nested in a vertical gallery but the horizontal gallery depends on some widths given by the client's request but as I don't know you can leave the dynamic templates, these will have to be left static and the client does not like this; Although one option is to remove the horizontal gallery and define several labels in the template of the vertical gallery, but that makes it much more rigid than having a nested horizontal gallery and more so because a data source was defined that allows this to be done more dynamically. I feel that they are taking a long time to accept and develop the flexible horizontal gallery and it is even more intriguing to me because they only implemented the flexible vertical gallery, it never crossed their mind "Developers will also want the flexible horizontal galleries, let's implement them along with the verticals" but well, I hope they are added soon (if soon it is from 2020, it has not even been taken as in progress)

 

PS: How long does it take for an idea from a poweruser to go "In Progress"? I have seen very good ideas but they still have the "New" status, so although it seems that it must have a high enough share of votes to consider developing the idea, it seems exaggerated that this idea takes a little more than 2 years and nothing has been resolved.