Results 1 to 7 of 7

Thread: Scrolling... not scrolling actually

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8

    Unhappy

    How do I, by the press of a button, scroll down 4 (or any other user definable number) lines down in my textbox? Pressing the scrollbar itself only scrolls down 3 lines.

    I've tried 4 x sendkeys chrw(40) but that doesn't work, plus it would be great if it didn't move the marker around.

    Pleas help me, I've been at it for too long now

    Sincerly,
    limsniffer!

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97

    Can you post the code

    Can you post a piece of your code so that i can also work on it to find out the solution..
    Anil

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8
    Well, I haven't written any code for it, because I honestly down know where to begin to make it work.
    This is what i want to do:

    Private Sub Command1_Click()

    Text1.Text scroll down 4 lines

    End Sub

    That's pretty much it!

    Sincerly,
    limsniffer

  4. #4
    Guest
    Code:
    Private Sub Command1_Click()
    
    Text1.SetFocus
    SendKeys "{DOWN 4}"
    
    End Sub

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8
    Finally!
    It works!

    Well, almost. I only want to scroll down 4 lines, if I already am at the bottom of the textbox. Is there any way to detect which line the marker is on?

    Thanks a lot!

    -limsniffer-

  6. #6
    Guest
    You can do it using a RichTextBox.

    Code:
    MsgBox RichTextBox1.GetLineFromChar(RichTextBox1.SelStart)
    This code will still work as well:

    Code:
    RichTextBox1.SetFocus
    SendKeys "{DOWN 4}"

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    8
    Okay, I'll just switch to a richtexbox then.

    Thank you for all your help!

    Regards,
    -limsniffer-

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