Zur Startseite

JRSpellChecker

Zur Homepage

ChangeWord(ByVal NewWord As String)

Beschreibung:

Dieses Ereignis wird immer dann ausgelöst, wenn mit dem internen Korrekturdialog (SpellCheckWithDialog) ein markiertes Wort durch ein neues ersetzt werden soll.

Der Korrekturdialog selektiert zwar das fehlerhafte Wort, der Austausch des Textes muss jedoch in einer eigenen Routine erfolgen siehe Beispiel.

       
         

ico_weitere Rückgabewert:


NewWord




Wort das anstelle des aktuell angewählten verwendet werden soll.

Beispiel RTF-Control:

    Private Sub JRSpell1_ChangeWord(NewWord As String)     Form1.RichTextBox1.SelText = NewWord
        'If we want select the changed word
        'Form1.RichTextBox1.SelStart = JRSpell1.SpellInfo_SelStartpos
        'Form1.RichTextBox1.SelLength = JRSpell1.SpellInfo_SelLength +JRSpell1.SpellInfo_StartposOffset
    End Sub

Beispiel TX-Textcontrol:

    Private Sub JRSpell1_ChangeWord(NewWord As String) TXTextControl1.SelText = NewWord
    'If we want select the changed word
    'TXTextControl1.SelStart = JRSpell1.SpellInfo_SelStartpos
    'TXTextControl1.SelLength = JRSpell1.SpellInfo_SelLength+JRSpell1.SpellInfo_StartposOffset
    End Sub

Beispiel Textbox:

    Private Sub JRSpell1_ChangeWord(NewWord As String)
      Text1.SelText = NewWord
      'If we want select the changed word
      'Text1.SelStart = JRSpell1.SpellInfo_SelStartpos
      'Text1.SelLength = JRSpell1.SpellInfo_SelLength +JRSpell1.SpellInfo_StartposOffset
    End Sub