Game Development Community

Help on GuiMLTextCtrl with scroll bar - reset each time the text change

by elvince · in Torque 3D Professional · 04/16/2010 (12:16 am) · 0 replies

Hi,

I'm trying to use the GuiMLTextCtrl in a scrollctrl. Each time I add text in the GuiMLTextCtrl, the scroll bar is moved automatically to the top, even if I forced it in the code to go to bottom.

I tried: scrollToBottom or pScroll->scrollTo(0, 0x7FFFFFFF); after the resize but it's failed.

Any tips or place too look at will be appreciated.

My goal is to stay at the bottom each time a text is added if the scroll bar was at the bottom (pScroll->isScrolledToBottom();)

How to test:
Put a scrollctrl and GuiMLTextCtrl inside it
call your GuiMLTextCtrl .AddText("<br>test"); multiple time so the scroll bar is shown.
Move the scrool to bottom
addtext again and you are at the top level.