Hi,
I am new in here. I hope someone will help me.I'm writing this peace of code to check if the inputted text are correct and change the color my text if it is wrong
My error is on SelectionStart and SelectionColor
Please see below my code
Private Sub RadRichTextEditor1_TextChanged(sender As Object, e As EventArgs) Handles RadRichTextEditor1.TextChanged Dim ValuetoCheck= RadRichTextEditor2.Text Dim ArrayValue() As String = W.Split(" ") For Each searchword As String In ValuetoCheck Dim index As Integer = 0 While index <> -1 index = RadRichTextEditor1.Text.IndexOf(searchword, index) If index <> -1 Then If index = RadRichTextEditor1.Text.Length - searchword.Length - 1 Then RadRichTextEditor1.SelectionStart = index RichTRadRichTextEditor1extBox1.SelectionLength = searchword.Length RadRichTextEditor1.SelectionColor = Color.Black RadRichTextEditor1.SelectionStart = RadRichTextEditor1.Text.Length Exit Sub Else index += 1 End If Else RadRichTextEditor1.SelectionStart = n RadRichTextEditor1.SelectionColor = Color.Red End If End While Next ' added End Sub