|
-
December 4th, 2003, 11:08 AM
#1
Rich text
I have a rich text control with the following code:
With RtfBox
.SelStart = 10
.SelLength = 5
.SelColor = vbRed
.Text = .Text & "text"
End With
The problem is: after I add another text I loose the previous format.
Thanks.
-
December 4th, 2003, 11:23 AM
#2
-
December 4th, 2003, 11:28 AM
#3
I've tried it but.....
I have tried your code but I don't see the problem.
Works just fine
Give up your guns and face the law!!
-
December 4th, 2003, 01:38 PM
#4
Try using the .SelText property to allow .SelBold, .SelColor, .SelAlignment and all others format property to be applied only with the .SelText value, here is a quick example:
Code:
With Me.RichTextBox1
.Text = ""
.SelStart = 0
.SelLength = 0
.SelColor = vbRed
.SelText = "RED"
.SelStart = 3
.SelLength = 0
.SelColor = vbBlue
.SelText = "BLUE"
End With
JeffB
-
December 8th, 2003, 07:58 AM
#5
After you format the text, add some more text and you'll see that the previous format disappears.
Thanks
-
December 8th, 2003, 09:27 AM
#6
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
|