cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stevegeall
Advocate II
Advocate II

Scroll multiple galleries at once

A person in the Facebook group 'PowerApps & Power Automate' asked:
"I have two different vertical galleries. I want to scroll the gallery2 according to the gallery 1 scrolling. is it possible?"


Which was something I had previously solved by:
https://www.youtube.com/watch?v=OFf_dXDn3P4

 

Put all the galleries inside a scrollable canvas datacard (*note to get a scrollable canvas, add a scrollable screen and copy the canvas component from it)

Set the scrollable canvas height to the size you want the scroll bar to be

Set the datacard height to: Tallest_Gallery.Height

Set the height of Tallest_Gallery (and all the galleries) to something like: CountRows( Tallest_Gallery.AllItems)*( Tallest_Gallery.TemplateHeight+ Tallest_Gallery.TemplatePadding)
(*note this will require the template size to be a hardcoded value or a dynamic value that doesn't create a circular reference)
 
This way the galleries will never show their scroll bars as the height is tall enough to accommodate all the gallery items without requiring a scroll bar. And you'll be able to scroll through the galleries via the scrolling of the canvas component.
I'm not sure if this will work for your situation, but it works for me where I have 2 galleries scrolling together.
I don't know how you'd line up the gallery items to correspond with the time of the day.

One app I created, to get the gallery items to line up with the corresponding times I used rectangle and textinput shapes and positioned them (x,y) based on calculations - for example if something needs to be at 9am and I know that each hourly block has a height of 100px with no padding, then from midnight that rectangle needs to be drawn at a y position of ~900px
 
 
I thought I'd post the idea here in case anyone else may find it helpful; or if anyone else has some other ideas for achieving the same/similar
 
Cheers,
Steve.
1 ACCEPTED SOLUTION

Accepted Solutions

Yes,This solution helped me. It worked perfectly. Thank you @stevegeall and @v-bofeng-msft 

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @stevegeall :

Thanks for sharing.I notice @PapithaSekar1 is now facing this problem,I think your solution will be helpful for him,

Best Regards,

Bof

Yes,This solution helped me. It worked perfectly. Thank you @stevegeall and @v-bofeng-msft 

View solution in original post

Hi, @stevegeall 

Hi @stevegeall ,

 

I am facing issue on template fill, I have all your step and now am able to scroll as required, all galleries are scrolling together, but template fill is not filling entire column. Please refer to the image

 

Canvas height - 1900

Datacard height - Gal_TimeInterval.Height

Gallery-Existing dose(main gallery) height - CountRows(Gal_DoseCount.AllItems)*(Gal_DoseCount.TemplateHeight+Gal_DoseCount.TemplatePadding)+100

Gallery.Dosecount(Nested gallery) -  CountRows(Gal_DoseCount.AllItems)*(Gal_DoseCount.TemplateHeight+Gal_DoseCount.TemplatePadding)+100

Timeinterval height (Tallest gallery) - CountRows(Gal_TimeInterval.AllItems)*(Gal_TimeInterval.TemplateHeight+Gal_TimeInterval.TemplatePadding)+100

 

Thanks in advance

 

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,324)