I'm using a richtextbox with scrolling and I need help with changing a certain line of text to an different color but when I use forecolor and appendtext it changes all the text in the textbox the same color. What can i do to change certain text lines?
Changing certain color texthelp with changing certain color of a line if text in a richtextbox
Page 1 of 1
3 Replies - 1681 Views - Last Post: 11 August 2009 - 02:40 PM
Replies To: Changing certain color text
#2
Re: Changing certain color text
Posted 11 August 2009 - 01:42 PM
Do you have any code? That would help.
#3
Re: Changing certain color text
Posted 11 August 2009 - 02:20 PM
Sounds like maybe you want to check out the SelectionColor property, or alter the underlying RTF.
#4
Re: Changing certain color text
Posted 11 August 2009 - 02:40 PM
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
int1 += 1
If int1 = 1 Then
Scrollbox.AppendText(" Go")
Call scrolldown()
Timer1.Stop()
End If
If int1 = 2 Then
Scrollbox.AppendText(" Stop " )
Call scrolldown()
Timer1.Stop()
End If
This is code for a part of the game Im trying to make and I want the text in different colors for each character. (The text is an example not part of the actual text)
Anyway give some examples because i'm new to vb.net
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|