|
-
Nov 9th, 2000, 12:25 PM
#1
Thread Starter
New Member
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!
-
Nov 9th, 2000, 12:38 PM
#2
Lively Member
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..
-
Nov 9th, 2000, 12:45 PM
#3
Thread Starter
New Member
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
-
Nov 9th, 2000, 01:38 PM
#4
Code:
Private Sub Command1_Click()
Text1.SetFocus
SendKeys "{DOWN 4}"
End Sub
-
Nov 9th, 2000, 01:51 PM
#5
Thread Starter
New Member
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-
-
Nov 9th, 2000, 02:05 PM
#6
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}"
-
Nov 9th, 2000, 02:14 PM
#7
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|