|
-
Jul 31st, 2000, 09:38 AM
#1
Thread Starter
New Member
Hi all,
I am designing some sort of a Text viewer in which a user can change the FontColor. I use a RichTextBox so that filesize is not limited to 32k. When I change the Text color, I use RTB options as .SelStart, .SelLen, .SelColor, etc.
However, when -in a large Text- you scrolled down and then change the Text color, the scrollbar is 'reset' to the top (or focused on the cursor position).
What I want now is that, effectively, changing the Text color does not affect the Scroll position in the RTB (just as setting the .BackColor property doesn't, or the ForeColor in a ordinary TextBox doesn't). I've tried the user32 functions GetScrollPos and SetScrollPos. The latter however, sets ONLY the Scoll Bar position, but leaves the Text position unchanged, so that only half of the job is done (you get the odd situation that you see the top of the text but the scrollbar is e.g. half way down...).
Can someone help me with this?
Thanx!
Gildor
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
|