SpellCheckWithDialog(ByVal xhwnd As Long, ByVal Startpos As Variant, ByVal controllltype As Bindto)
Note: Up from Version2 the Startpos has changed from Long to Variant
|
Function:
|
|
|
|
checks the current document up from the startpos. The control shows a correction dialogue, so the user can type in the correct word, or select them from a list (only if Word-Dictionary is selected)
|
|
|
|
All dialoges can be viewed in different languages look at the UILanguage setting.
|
|
|
|
Select a other Word:
- The user can type in the word in the edit field.
The user can select a word in the list By double click: the word in the document will be changed. By spacebar: the word goes up to the edit field.
Change the word in the document:
Use "Change All" to change the same words. If the word in the textfiel was changed, this changed word will be used otherwise the word who is selected in the list.
|
|
|
       
        You can set some style flags for the correction window.
JRSpell1.CorrectionDialogActions=ShowModalForm & SearchNextAfterClickList & ShowAddButtonLokalWordBook & ShowAddButtonMSWord & ShowChangeButton & ShowIgnoreAllButton & ShowChangeAllButton
|
Syntax:
|
|
|
|
|
JRSpell1.SpellCheckWithDialog x.hwnd, startpos, xtype
|
|
|
x.HWND
|
HWND of the RTF-Control, the textbox or the TX-Textcontrol
|
|
|
x.type
|
xRtf_Control=1, xText_Box=2, xTX_Textcontroll=3; NetRtf_Control=11
|
|
|
startpos
|
start the spell check at this position
|
|
|
|
|
|
       
|
  Return value:
|
|
|
|
|
nothing.
Fires the ChangeWord event if the user select one of the "change the word in the document" methods
|
|
|
Example RTF-Control:
|
|
|
Private Sub Command1_Click() 'set options for the correction dialoge JRSpell1.CorrectionDialogActions = SearchNextAfterClickList + ShowAddButtonLokalWordBook + ShowAddButtonMSWord + ShowChangeButton + ShowIgnoreAllButton + ShowChangeAllButton JRSpell1.SpellCheckWithDialog RichTextBox1.hWnd, 0, Rtf_Control End Sub
|
|
|
Example TX-Textcontrol:
|
|
|
Private Sub Command1_Click() 'set options for the correction dialoge JRSpell1.CorrectionDialogActions = SearchNextAfterClickList + ShowAddButtonLokalWordBook + ShowAddButtonMSWord + ShowChangeButton + ShowIgnoreAllButton + ShowChangeAllButton JRSpell1.SpellCheckWithDialog TXTextControl1.hWnd, 0, TX_Textcontroll End Sub
|
|
|
Example Textbox:
|
|
|
Private Sub Command2_Click() JRSpell1.CorrectionDialogActions = SearchNextAfterClickList +ShowAddButtonLokalWordBook + ShowAddButtonMSWord + ShowChangeButton + ShowIgnoreAllButton + ShowChangeAllButton JRSpell1.SpellCheckWithDialog Text1.hWnd, 0, Text_Box End Sub
|
|
Note: Use in .Net or Web applications the ShowModalForm switch of CorrectionDialogActions.
|