I am creating a custom contextual menu for a TextArea… and need to add Spelling and Grammar?
(both macOS and Win if it makes a difference)
Dim mm As MenuItem
Dim hasTxt As Boolean=(Len(Me.Text)>0)
Dim hasSel As Boolean =(Me.SelLength>0)
//base.Append(EditUndo.clone)
//
mm=EditCut.clone
mm.enabled=(hassel)
base.append(mm)
//
mm=EditCopy.clone
mm.enabled=(hassel)
base.append(mm)
//
Dim cb As New Clipboard
mm=EditPaste.clone
mm.Enabled=(cb.TextAvailable)
base.append mm
//
base.append(EditSeparator1.clone)
//
mm=EditClear.clone
mm.enabled=(hassel)
base.append(mm)
//
mm=EditSelectAll.clone
mm.Enabled=hasTxt
base.append mm
Tried to decypher the code in MacOSLib to no avail… I can’t load it into 2019 (2012 only) and can’t make heads or tails since there is little to no comments included
Public Sub CheckSpelling(t as textarea)
#If TargetCocoa Then
Declare Sub showGuessPanel Lib "Cocoa" selector "showGuessPanel:" (obj_id As Integer, sender As Integer)
showGuessPanel(t.Handle, t.Handle)
#Else
#Pragma Unused t
#EndIf
End Sub