|
-
Nov 18th, 2002, 04:28 PM
#1
Thread Starter
Member
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 ???
-
Nov 18th, 2002, 06:06 PM
#2
yay gay
textbox1.selectionstart = 0;
or
textbox1.selectionstart = textbox1.text.length;
\m/  \m/
-
Nov 19th, 2002, 12:24 PM
#3
Thread Starter
Member
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??
-
Nov 19th, 2002, 01:19 PM
#4
PowerPoster
Everytime you add something to the text box, add the line
textbox1.selectionstart = textbox1.text.length;
right after it.
-
Nov 19th, 2002, 01:39 PM
#5
Thread Starter
Member
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
Last edited by spike232; Nov 19th, 2002 at 02:31 PM.
-
Nov 20th, 2002, 01:41 PM
#6
yay gay
u must focus the textbox!
\m/  \m/
-
Nov 20th, 2002, 02:22 PM
#7
Thread Starter
Member
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??
-
Nov 22nd, 2002, 04:17 PM
#8
Frenzied Member
u can dig into api's.. SendMessage api
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|