-
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!
-
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..
-
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
-
Code:
Private Sub Command1_Click()
Text1.SetFocus
SendKeys "{DOWN 4}"
End Sub
-
Finally!
It works! :D
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- :)
-
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}"
-
Okay, I'll just switch to a richtexbox then.
Thank you for all your help! :)
Regards,
-limsniffer-