Skip to main content
Known Participant
Apr 2, 2009 5:00 PM UTC
Answered

How to scroll to a flowelemnt

My question is quite simple: I retrieve a FlowElement instance by calling getElementById() on a textflow, now what I'd like to find out is the position of this flowelement, so I can call scrollToPosition() on an IContainerController instance.
What should I use to find out the required position for a given FlowElement?

thanks a lot in advance!
This topic is closed to new replies. Start a new post to keep the conversation going.
rdermerCorrect answer
Inspiring
Apr 2, 2009 9:07 PM UTC
The position you want is flowElement.getAbsolutePosition(). That will scroll the very beginning of the element into view.

2 replies

rdermerCorrect answer
Inspiring
Apr 2, 2009 9:07 PM UTC
The position you want is flowElement.getAbsolutePosition(). That will scroll the very beginning of the element into view.
Translate
mech-headAuthor
Known Participant
Apr 3, 2009 6:20 AM UTC
hi there,

There's no getAbsolutePosition() method, but I'm sure you meant getAbsoluteStart() :) So, thank you very much, this did save me a bunch of time of trial and error.

cheers!
Translate