Home Forums General XMetaL Discussion v5.5 Spell Checker Reply To: v5.5 Spell Checker

Derek Read

Reply to: v5.5 Spell Checker

The details of this depend on the application you have embedded XMAX into and the programming language being used and the development environment. Essentially any application that allows you to embed an ActiveX control typically requires you to give that embedded copy of the control a name. In some cases this may be done automatically by suggesting a name for you. This name is what our documentation calls “myXMControl” which is a hint that you may use any name you like. You might prefer to call it simply “xmax1”, “xmlEditor”, or whatever you like (provided your environment does not have any restrictions on the naming).

If your development environment provides a graphical layout tool for designing forms, etc, and you have placed XMAX on a form it may have a “properties” window or dialog that lets you examine properties associated with XMAX. In many environments the property you would be looking for in this case would probably beĀ  called “name” or “control name” or something along those lines.

Consult the documentation for your particular environment regarding embedding ActiveX controls. Hopefully they will provide an example that shows how to work with a commonly available control, such as the Windows “calendar control” or another control that has a GUI.

Once you are able to embed XMAX it must have a property you can refer to in order to pass commands to it (this is the “myXMControl” in our documentation examples). XMAX automatically finds the spell checker if it is installed and launches it when you call the method myXMControl.ShowSpellChecker(), substituting “myXMControl” with the name you have chosen to declare the control as, like xmax1.ShowSpellChecker() or xmlEditor.ShowSpellChecker().

If you cannot be sure the spell checker is installed (perhaps your system allows some users to opt out of running the spell checker installation or for some other reason) you may wish to wrap the call to ShowSpellChecker() within an if…then statement that checks the boolean property myXMControl.IsSpellCheckerInstalled or you may wish to use that property to disable the portion of your UI that allows the user to launch the spell checker.