Showing results for 
Search instead for 
Did you mean: 

A Gallery with Auto-Height.

I'm not talking about flexible-height galleries where templates increase in size when needed.

I want a gallery that could increase its height as it displays more data.


Potential Uses:

  1. Displaying Parent-Child Relationships / Trees.
    Say, for example, you have a collection like this:
    A List of Persons and Corresponding Tasks
            Name: "Person A",
            Role: "Job X",
            Tasks: [
                { Title: "Answer Qn I - IV", Priority: "High" },
                { Title: "Call Back Person B", Priority: "Low" },
                { Title: "Do Report D", Priority: "High" },
            Name: "Person B",
            Role: "Job Y",
            Tasks: [
                { Title: "Do Report F", Priority: "Medium" }
    While it may seem complicated, this can be made using the AddColumns() function -- which seems to be the way to retrieve parent-child relationships in PA.
    I could use a flexible height gallery for the parent, which in this case would be Persons, and have it display neatly. But I can't do that with the children Tasks. I could display each person's tasks in a label using the Concat() function but that would extremely limit formatting. I could display each person's tasks with a gallery inside but I won't be able to fully control the height of the gallery to just take as much height as it needs. With what we have right now, either there's going to be awkward spacing (too much height) or awkward scrolling (too little; scroll takes effect inside a section that already has scroll. Two scrollbars.) An auto-height gallery would fix these problems and display the hierarchy more elegantly.

  2. Adding Customizable Scrollable Sections
    Say, for example, I have a list of Tasks I could use to populate a gallery. But, in the screen, I want the user to see some message at the top of the list (e.g. what kind of tasks are they). But, I don't want that message to just stay in the screen. I want it to be displayed with the other tasks, wherein the user scrolls down and the message just gets moved out. 
    With an auto-height gallery, I could do the following set-up:
    (1) Have a canvas object. (2) On the first card, add the message. (3) On the second card, add the auto-height gallery.
    With that, I could also add a third card that has a button for Add Task or some other control I want to include.


Status: New
Regular Visitor

I have managed this using basic calculations of the number of rows in the gallery * height of each row.


Eg: Set the Gallery height to: CountRows(galContacts.AllItems) * 105 (where galContacts is the name of your gallery).