Posted 12 December 2022, 1:17 pm EST
1st thanks for the reply and sample.
i managed to get it to work, but the misspelled words do not get the red underline.
red underline
only appears at beginning of the textbox and 1 char long???
[code] Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
C1SpellChecker1.SetActiveSpellChecking(CType(TextEdit1, ISpellCheckableRichEditor), True)
[code]Imports C1.Win.C1SpellChecker
Imports DevExpress.XtraEditors
Public Class TextEditEx
Inherits TextEdit
Implements ISpellCheckableRichEditor
Public ReadOnly Property Control As Control Implements ISpellCheckableEditor.Control
Get
Return Me
End Get
End Property
Public Property HideSelection As Boolean Implements ISpellCheckableEditor.HideSelection
Get
Return MyBase.Properties.HideSelection
End Get
Set(value As Boolean)
MyBase.Properties.HideSelection = value
End Set
End Property
Private Property ISpellCheckableEditor_Text As String Implements ISpellCheckableEditor.Text
Get
Return MyBase.Text
End Get
Set(value As String)
MyBase.Text = value
End Set
End Property
Private Property ISpellCheckableEditor_SelectedText As String Implements ISpellCheckableEditor.SelectedText
Get
Return MyBase.SelectedText
End Get
Set(value As String)
MyBase.SelectedText = value
End Set
End Property
Private Property ISpellCheckableEditor_SelectionStart As Integer Implements ISpellCheckableEditor.SelectionStart
Get
Return MyBase.SelectionStart
End Get
Set(value As Integer)
MyBase.SelectionStart = value
End Set
End Property
Private Property ISpellCheckableEditor_SelectionLength As Integer Implements ISpellCheckableEditor.SelectionLength
Get
Return MyBase.SelectionLength
End Get
Set(value As Integer)
MyBase.SelectionLength = value
End Set
End Property
Public Sub BeginSpell() Implements ISpellCheckableEditor.BeginSpell
End Sub
Public Sub EndSpell() Implements ISpellCheckableEditor.EndSpell
End Sub
Private Sub ISpellCheckableEditor_Select(start As Integer, length As Integer) Implements ISpellCheckableEditor.Select
MyBase.Select(start, length)
End Sub
Public Function GetBaselineOffset(range As CharRange) As Integer Implements ISpellCheckableRichEditor.GetBaselineOffset
Return Font.Height
End Function
Public Function HasMoreText() As Boolean Implements ISpellCheckableEditor.HasMoreText
Return False
End Function
Private Function ISpellCheckableRichEditor_GetCharIndexFromPosition(pt As Point) As Integer Implements ISpellCheckableRichEditor.GetCharIndexFromPosition
Return MyBase.GetCharIndexFromPosition(pt)
End Function
Private Function ISpellCheckableRichEditor_GetPositionFromCharIndex(index As Integer) As Point Implements ISpellCheckableRichEditor.GetPositionFromCharIndex
Return MyBase.GetPositionFromCharIndex(index)
End Function
End Class
[/code]