Results 1 to 9 of 9

Thread: Text box scrolling

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    10

    Text box scrolling

    How do I make my text box automatically scroll down when it's text is changed? I am making a chat app and I have finally got it to work but when the amount of text exceeds the size of the text box the scroll bar is activated but it stays up the top. Is there code to bring it down? - Thanks for your help

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Yeah, in a roundabout sort of way.

    Use
    Code:
    text1.SelectionStart = text1.text.length
    text1.SelectionLength = 0
    Something like that, I haven't got the energy to try it myself. See if it works. If you get an error on the first line try subtracting 1 from the length

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    10
    - Invalid qualifier .Text ???

    hmm weird

  4. #4
    Addicted Member Codehammer's Avatar
    Join Date
    Aug 2004
    Posts
    164

    Resolution

    TextBox1.SelectionStart = TextBox1.TextLength
    TextBox1.ScrollToCaret()

    yeeehaw - My First Attempt at Assistance.
    Curiosity SKILLED the cat
    Google Talk from your Mobile phone

    Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    10
    still not working

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    10
    blablabla expected "="

  7. #7
    Hyperactive Member
    Join Date
    Aug 2004
    Posts
    281
    maybe you can cut off the text that goes past the top line.. so you can avoid the scroll bars and not have to scroll~

  8. #8
    Addicted Member Codehammer's Avatar
    Join Date
    Aug 2004
    Posts
    164

    Try This

    Try This it works.
    Attached Files Attached Files
    Curiosity SKILLED the cat
    Google Talk from your Mobile phone

    Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2

  9. #9
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    Just do this...

    VB Code:
    1. me.textbox1.AppendText("Text text text" & vbcrlf)
    "I'm Brian and so is my Wife"

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