Zur Startseite

JRSpellChecker

Zur Homepage

PopupCharPos(Charnumber As Long, ByVal xhwnd As Long, ByVal controllltype As Bindto)

Function:

the word at charnumber position will be checked.

popupkorre
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.

     

ico_syntax   Syntax:

JRSpell1.PopupCharPos charnumber, x.hwnd, xtype

x.HWND

HWND of the RTF-Control, Textbox or TX-TextControl

x.type

xRtf_Control=1, xText_Box=2, xTX_Textcontroll=3; NetRtf_Control=11

charnumber

for example the actual cursor position.

       

ico_weitere   Return Value:


Nothing

fires the ChangeWord event if the user select a new word

Example RTF-Control: SpellCheckLastInput

Example TX-Textcontrol: SpellCheckLastInput

    xPrivate Sub TXTextControl1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim
    xpos As Long
    xpos = TXTextControl1.SelStart
    If
    xpos > 0 And Button = 2 Then
    erg = JRSpell1.PopupCharPos(
    xpos, TXTextControl1.hWnd, TX_Textcontroll)
    End If
      'example for a own alternate word routine.
     
    'xword = JRSpell1.MisspelledWordFromCharPos(xpos,
    TXTextControl1.hWnd, TX_Textcontroll)
      'If
    xword <> "" Then
      ' Caption =
    xword
      ' JRSpell1.PopupWord (
    xword)
      'End If
    End Sub


    'For TX-Textcontrol up from V9 you can use these function
    charpos = TXTextControl1.InputPosFromPoint(x, y)
    JRSpell1.PopupCharPos
    charpos, TXTextControl1.hWnd, TX_Textcontroll

    '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.MisspelledWordFromCharPos(charpos, TXTextControl1.hWnd, TX_Textcontroll)
        'If
    xword <> "" Then
        ' Caption =
    xword
        ' JRSpell1.PopupWord (
    xword)
        'End If
    End If

Example Textbox: SpellCheckLastInput