PopupWord(xWord As String)
|
Function:
|
|
|
|
shows a popup for a given word.
You can use this function for your own created textcontrol if PopupCharPos or PopupMousePos does not work.
|
|
|
|
All dialoges can be viewed in different languages look at the UILanguage setting.
|
|
|
|
|
|
|
         
|
If the word is misspelled a popup context menu with suggestions and options to 'Ignore All' or 'Add' to user dictionary are shown.
|
|
|
|
|
|
|
|
     
|
  Syntax:
|
|
|
|
|
JRSpell1.PopupWord xWord
|
|
|
xWord
|
misspelled word
|
|
|
|
|
|
|
|
|
|
|
|
|
|
         
|
Return Value:
|
|
|
|
|
Nothing
fires the ChangeWord event if the user select a new word
|
|
|
Example TX-Textcontrol:
|
|
|
Private Sub TXTextControl1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'example for a own alternate word routine. xword = JRSpell1.MisspelledWordFromCharPos(xpos, TXTextControl1.hWnd, TX_Textcontroll)   If xword <> "" Then   JRSpell1.PopupWord (xword)   End If End Sub
|
|
|
Example RTF-Control:
|
|
|
Private Sub RichTextBox1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = 2 Then 'PopupMenu mop   'a alternate for a own alternate word routine is to get the word at mouse pos and show the popup for correction the word with alternates   xword = JRSpell1.MisspelledWordFromMousePos(x, y, RichTextBox1.hWnd, Rtf_Control)   If xword <> "" Then   JRSpell1.PopupWord (xword)   End If End If End Sub
|
|
|
Example Textbox:
|
|
|
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)   If Button = 1 Then 'PopupMenu mop     'a alternate for a own alternate word routine is to get the word at mouse pos and show the popup for correction the word with alternates     xword = JRSpell1.MisspelledWordFromMousePos(X, Y, Text1.hwnd, Text_Box)     If xword <> "" Then     JRSpell1.PopupWord (xword)     End If   End If End Sub
|
|
|