|
-
Dec 8th, 2002, 06:05 PM
#1
Thread Starter
Hyperactive Member
rich text boxes
VB Code:
Private Sub cmdAddText_Click()
rtfTesting.Text = txtToAdd & vbCrLf & rtfTesting.Text
rtfTesting.SelStart = 0
rtfTesting.SelLength = Len(txtToAdd)
rtfTesting.SelColor = vbRed
End Sub
when i click the command button, the top line of my textbox changes which it what i want but then ALL of the lines underneath it are reverted to the last colour of the top line? i've looked at the .TextRTF in a normal textbox and can see why this happens but i havent got a clue how to get round it anyone?
- cheers
Last edited by adzzzz; Dec 8th, 2002 at 06:29 PM.
-
Dec 8th, 2002, 06:16 PM
#2
adzzzz,
try
rtfTesting.SelLength = Len(txtToAdd & vbCrLf & rtfTesting.Text)
instead of
rtfTesting.SelLength = Len(txtToAdd)
-
Dec 8th, 2002, 06:17 PM
#3
Thread Starter
Hyperactive Member
that changes the colour of the whole textboox was my fault lol i'd made my question out wrong
Last edited by adzzzz; Dec 8th, 2002 at 06:30 PM.
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
|