SpellCheckDocument(ByVal xhwnd As Long, ByVal controllltype As Bindto) As Boolean
|
Funktion:
|
|
|
|
prüft das gesamte Dokument auf Fehler und markiert die fehlerhaften Wörter mit dem bereits gewählten Stil und der festgelegten Farbe.
|
|
|
|
Sollte die Autokorrekturfunktion aktiv sein, werden in der Autokorrekturliste definierte Wörter nicht markiert, sondern direkt ersetzt. In diesem Fall wird das Event ChangeWord aufgerufen.
|
|
|
|
|
|
|
       
|
  Syntax:
|
|
|
|
|
JRSpell1.SpellCheckDocument x.hwnd, xtype
|
|
|
x.HWND
|
HWND des RTF-Steuerelements, der Textbox oder des Textcontrols
|
|
|
x.type
|
xRtf_Control=1, xText_Box=2, xTX_Textcontroll=3; NetRtf_Control=11
|
|
       
|
  Rückgabewert:
|
|
|
|
|
True wenn Dokument ohne Fehler ist
löst DocumentSpellChecked Event aus
|
|
|
Beispiel RTF-Control:
|
|
|
Private Sub Command3_Click() JRSpell1.AutoCorrectionOn JRSpell1.SpellCheckDocument RichTextBox1.hWnd, Rtf_Control JRSpell1.AutoCorrectionOff End Sub
Private Sub JRSpell1_DocumentSpellChecked(CheckedWords As Long, IncorrectSpells As Long) Caption = "Anzahl Wörter " + Str$(CheckedWords) + " / Fehler " + Str$(IncorrectSpells) End Sub
|
|
|
Beispiel TX-Textcontrol:
|
|
|
Private Sub Command3_Click() JRSpell1.AutoCorrectionOn JRSpell1.SpellCheckDocument TXTextControl1.hWnd, TX_Textcontroll JRSpell1.AutoCorrectionOff End Sub
Private Sub JRSpell1_DocumentSpellChecked(CheckedWords As Long, IncorrectSpells As Long) Caption = "Anzahl Wörter " + Str$(CheckedWords) + " / Fehler " + Str$(IncorrectSpells) End Sub
|
|
|