-
scroling the other way
how do u make a text box (with scrolbar) work like a log dispaly window.
eg
the new event/messages are added at the bottom, but when the area gets full and the scrollabar becomes active the scrollbar stays at the bottom,so u can always see the newest messages/events unless u scroll up urself ???
-
textbox1.selectionstart = 0;
or
textbox1.selectionstart = textbox1.text.length;
-
thanks, but that only works when u click in the txt box, and if u click out of it it stops scrolling down, is there another way??
-
Everytime you add something to the text box, add the line
textbox1.selectionstart = textbox1.text.length;
right after it.
-
thats what i have done,
for testing this, i have a textbox and a timer on a form
on the timer event it adds a line to the text box
then sets that right after it
when the form first loads it u leave it it fills the text box then when it fills up the scroll bar stays at the top while it files up, now if u clic on it it jumps to the bottom, if u click out of it, it will stay where it last was
:confused:
-
u must focus the textbox!
-
is there anyway to do it that will allow u to use other controls on the form withoguht affecting it?? eg not having to give it focus all the time??
-
u can dig into api's.. SendMessage api