VerticalScrollTo

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

VerticalScrollTo

Post by caseywhite »

I an set up a simple example where VerticalScrollTo works. I can also make it work on the web page if I want it to scroll to the top of the page. I am having an issue making it work in any reusable parts that are my main pages. Are there any known issues where VerticalScrollTo will run into issues trying to scroll to a certain control on the page? Is there any other method to position to a part of the page if VerticalScrollTo will not work.
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VerticalScrollTo

Post by Stewart Marshall »

Hi Casey

VerticalScrollto will work for any control directly parented to a composite control (WebPage or Panel). However, if the control is the child of a child, e.g a button on a panel on a page, it won't scroll. The original design for this took in to consideration that the panel may actually have a scrollbar too. Scrolling within scrolling is a bit strange, so the logic stops at one level.

Given the benefits of hindsight etc, I suspect it should work provided the only scroll bar is on the control issuing the VerticalScrollTo. Please report this as a bug.

With regards to a reusable part, I'm a little confused as to what you're asking. As a reusable part is just a panel, #Com_owner.VerticalScrollTo means that the reusable part should scroll, assuming it has a scrollbar. It doesn't mean that the parent of the part should try to scroll.

Did I misunderstand the question?

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: VerticalScrollTo

Post by caseywhite »

I found what I consider a valid workaround. Since I know where in my RP the top of the control is, I simple send out a signal that the main web page picks up. It then sets the top of a blank label to the correct top value and then does a vertical scroll to the label on the web page. That yields the result I am looking for.

Since we are more than 1 level deep that is probably why it isn't working. I can understand why it wouldn't make sense to implement this more than 1 level deep, so I am happy with the workaround. I have implemented it in a way that can be used generically throughout the system.
Post Reply