Results 1 to 8 of 8

Thread: scroling the other way

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    39

    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 ???

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    textbox1.selectionstart = 0;

    or

    textbox1.selectionstart = textbox1.text.length;
    \m/\m/

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    39
    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??

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Everytime you add something to the text box, add the line
    textbox1.selectionstart = textbox1.text.length;
    right after it.

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    39
    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.

  6. #6
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    u must focus the textbox!
    \m/\m/

  7. #7

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    39
    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??

  8. #8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width