|
-
Feb 11th, 2005, 05:18 PM
#1
Thread Starter
Fanatic Member
Rich Text Box [RESOLVED]
i want to go through the contents in a rich text box letter by letter and retreive the color of each character. How?
Last edited by Nove; Feb 12th, 2005 at 12:55 PM.
-
Feb 11th, 2005, 05:32 PM
#2
Re: Rich Text Box
VB Code:
Dim i As Integer
For i = 1 To Len(RTB.Text)
RTB.SelStart = i
RTB.SelLength = 1
MsgBox RTB.SelColor
Next
Has someone helped you? Then you can Rate their helpful post. 
-
Feb 11th, 2005, 08:43 PM
#3
Thread Starter
Fanatic Member
Re: Rich Text Box
thanks.
Also, I need my rtb to have vertical and horizontal scrollbars, but when I set the scrollbars property to 3 (both) it never displays any horizontal scroll bars. What's wrong?
-
Feb 11th, 2005, 08:59 PM
#4
Re: Rich Text Box
They will appear when the text is bigger than the textbox.
You have done everything right!
-
Feb 11th, 2005, 09:10 PM
#5
Thread Starter
Fanatic Member
Re: Rich Text Box
Sorry, but I must not be understanding something. I type until it gets to the very right edge of the box but then it just stays there and won't upon any scroll bars. Is it because I have multiline on?
-
Feb 11th, 2005, 09:33 PM
#6
Re: Rich Text Box
The following two properties must be set:
- DisableNoScroll = True
- ScrollBars = 3 (rtfBoth)
-
Feb 11th, 2005, 10:09 PM
#7
Re: Rich Text Box
D'oh. I forgot that one. Is it working now?
-
Feb 11th, 2005, 10:52 PM
#8
Thread Starter
Fanatic Member
Re: Rich Text Box
sorry, that doesn't seem to solve it. While disabled scroll bars are now visible text just continues to loop rather than extending with the scroll bar.
-
Feb 11th, 2005, 11:36 PM
#9
Re: Rich Text Box
set thr RightMargin property (in twips) to as far as you want to type before it wraps the text. 
and if you set DisableNoScroll to true, the bars wil pop up as needed.
-
Feb 12th, 2005, 01:58 AM
#10
Re: Rich Text Box
Here is what help has to sy:
A horizontal scrollbar will appear only when the RightMargin property is set to a value that is larger than the width of the control. (The value can also be equal to, or slightly smaller than the width of the control.)
-
Feb 12th, 2005, 12:55 PM
#11
Thread Starter
Fanatic Member
Re: Rich Text Box
that works, thanks everyone.
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
|