i want to go through the contents in a rich text box letter by letter and retreive the color of each character. How?
Printable View
i want to go through the contents in a rich text box letter by letter and retreive the color of each character. How?
VB Code:
Dim i As Integer For i = 1 To Len(RTB.Text) RTB.SelStart = i RTB.SelLength = 1 MsgBox RTB.SelColor Next
:)
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?
They will appear when the text is bigger than the textbox.
You have done everything right! :wave:
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?
The following two properties must be set:
- DisableNoScroll = True
- ScrollBars = 3 (rtfBoth)
D'oh. I forgot that one. Is it working now?
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.
set thr RightMargin property (in twips) to as far as you want to type before it wraps the text. :wave:
and if you set DisableNoScroll to true, the bars wil pop up as needed.
Here is what help has to sy:
Quote:
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.)
that works, thanks everyone.