cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
morgs
Regular Visitor

Track the position of a gallery scroll bar

Hi All!

 

I have a vertical gallery that has a scroll bar. I want to have a shadow image that I only want to be visible if there the scroll bar is not at the bottom. So once the user has scrolled to the end of the gallery the shadow image will be set to Visible = false.

 

morgs_0-1624243822721.png

 

To do so, I am wondering if there is a way I can track the position of the scroll window or scroll bar Y position.

 

If( user has scrolled to the bottom of the gallery , ShadowImage.Visible = false).

 

Using Gallery.VisibleIndex is not suitable for the scenario unfortunately.

 

Any help appreciated! 

 

5 REPLIES 5
ganeshsanap
Memorable Member
Memorable Member

@morgs I don't think you can track the position of scroll bar in a gallery control.

 

I didn't find anything related to position of scroll bar in official documentation: Gallery control in canvas apps 


Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

Best Regards,

Ganesh Sanap

Blog site 

rwittels
Resolver I
Resolver I

I figured this out. I have a Vertical Container. Below it, I have an arrow pointing down to let the user know that there is more content in it. The last item in my container is called lastItem (for example). The arrow's visibility is set to lastItem.Y>=-200 (-200 being the distance one has to scroll to get to the bottom). This is also how you can check how far a user has scrolled. Unfortunately, this does not work with gallery fields.

Hi @rwittels ,

Can you please share more info or show the screenshot how you set it in the arrow and last item from the container? 

 

Thank you.

Hi. Make sure that your vertical container is set to Scroll on Vertical Overflow.

rwittels_0-1663573636753.png

 

Place the arrow directly below the vertical container, not inside it.

rwittels_1-1663573864047.png

 

Set the Visible Property of your arrow to LastItem.Y>=-250. LastItem is the name of the last component in your vertical container and -250 is how far the item moves upwards when you scroll before it is fully visible at the bottom of your container. You will have to test and change this value a few times until you get it right.

 

phipps0218
Super User
Super User

Make sure that your vertical container is set to Scroll on Vertical Overflow.

Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,359)