M
marfi95
Hi all,
I am trying to change the color of text that the user sees when they
are editing a richtextbox. This is the code I am using in the
TextChanged method of RichTextBox control.
Dim position As Integer = rtb.SelectionStart
rtb.Refresh()
rtb.SelectionStart = position
rtb.SelectionLength = 1
rtb.SelectionColor = Color.Red
This works starting with the 2nd character. The first character typed
is not red, but all typed characters after that are. Not sure why.
Any ideas ?
Thanks,
Mark
I am trying to change the color of text that the user sees when they
are editing a richtextbox. This is the code I am using in the
TextChanged method of RichTextBox control.
Dim position As Integer = rtb.SelectionStart
rtb.Refresh()
rtb.SelectionStart = position
rtb.SelectionLength = 1
rtb.SelectionColor = Color.Red
This works starting with the 2nd character. The first character typed
is not red, but all typed characters after that are. Not sure why.
Any ideas ?
Thanks,
Mark