Link to home
Start Free TrialLog in
Avatar of frogman_j
frogman_j

asked on

Scrolling a Textbox

I have tried the scrollwindowex api function, but it doesn't work and i don't want to use a listbox for it.
Avatar of AzraSound
AzraSound
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of Ark
Ark
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nicehumanbeing
nicehumanbeing

try this : put a lotta text into the textbox. somewhere towards the end u add "FIND THIS"

put this into a command button


Text1.SelStart = InStr(1, Text1, "FIND THIS")
Text1.SelLength = 0
Text1.SetFocus
' be sure to put this setfocus line in


NOte : instead of the "FIND THIS TEXT" and the instring, u can simply add an average no of chars and repeat this in a timer to create a cute scroll effect.
Hope this solves ur problem .

ARK too has a nice solution for pixels...

Avatar of frogman_j

ASKER

I used a modification of Ark's code, so put in an answer Ark!
never mind, Ark
Thanks for the bit of code. I looked at more of the SB_ constants and I can use it like I want now.
Just one more question. Is there a way to scroll to the bottom cleanly?
Thanks for points, glad to help you!
About scrolling to bottom - it's simply - no API
Text1.SelStart = Len(Text1.Text)
Cheers