#1025 Scrolling multiline fwt::TextWidget's programmatically

tactics Sun 14 Mar 2010

For my telnet app, I continually add new lines of text to a multiline fwt::Text object. However, when the visible lines are all filled, new lines are added off-screen and the vertical scrollbar expands. Is there a way I can change the scroll position?

Also, what is the best way to execute code immediately after a window is created? onFocus seems to do the job for now, but what I really want is a one-time onCreate or onOpen trigger.

KevinKelley Sun 14 Mar 2010

When you use RichText there's showLine, but Text doesn't have that api. Probably should, I'd think.

You might workaround by using select to flash the text you enter: setting the text selection has the side effect of making the selection visible.

brian Mon 15 Mar 2010

Yes, I believe select should work (even if it is an empty selection).

Probably should move showLine up to Text (should be nicely scoped patch if anyone wants to fix that)

Login or Signup to reply.