K
Klaasjan
Hi,
In my programm users can enter text which is added to a richtextbox.
Everytime a text is added, this text had get his own color.
The first 2 times it goes fine,
eg.
hallo (red)
hallo (yellow)
But when a third time a text is added with e.g. the color blue, the
first 2 gets the color red ??
Help what am i doing wrong
Here my piece of code:
Dim c As Color
If rbtrood.Checked Then
c = Color.Red
End If
If rbtgeel.Checked Then
c = Color.Yellow
End If
If rbtblauw.Checked Then
c = Color.Blue
End If
With rtb
.Text &= rtbinvoer.Text
.SelectionStart = L
.SelectionLength = rtbinvoer.Text.Length
.SelectionColor = c
End With
L = rtb.Text.Length
Hope anyone can help me,
Thank already
Klaasjan
In my programm users can enter text which is added to a richtextbox.
Everytime a text is added, this text had get his own color.
The first 2 times it goes fine,
eg.
hallo (red)
hallo (yellow)
But when a third time a text is added with e.g. the color blue, the
first 2 gets the color red ??
Help what am i doing wrong
Here my piece of code:
Dim c As Color
If rbtrood.Checked Then
c = Color.Red
End If
If rbtgeel.Checked Then
c = Color.Yellow
End If
If rbtblauw.Checked Then
c = Color.Blue
End If
With rtb
.Text &= rtbinvoer.Text
.SelectionStart = L
.SelectionLength = rtbinvoer.Text.Length
.SelectionColor = c
End With
L = rtb.Text.Length
Hope anyone can help me,
Thank already
Klaasjan