TX Spell .NET for Windows Forms

What's New in TX Spell .NET for Windows Forms 8.0

Topic

TX Spell .NET for Windows Forms 8.0 is mostly about the details users notice: dialog boxes that stay sharp when a window moves between monitors, user dictionaries that load faster and take less memory, and user dictionaries that follow the character rules of the language. It also lets you load a dictionary that users can't change in the options dialog.

Version 8.0 was released on December 2, 2020, together with TX Text Control X19. The version after it is Version 9.0. The blog article TX Text Control X19 and TX Spell 8.0 Have Been Released announced it.

Version 8.0 at a Glance

AreaWhat is new
Dialog boxesPer-monitor DPI awareness of the spell check dialog and the options dialog
User dictionariesShorter loading times, a smaller memory footprint and support for special character flags
DictionariesDictionary.ShowInOptionsDialog hides a dictionary from the options dialog

Per-Monitor DPI Awareness

Since the Windows 10 Creators Update (version 1703), the scaling of an application depends on the DPI of the display that its main window is mainly shown on. With several monitors, each display can have a different scale factor.

TX Spell .NET 8.0 supports such setups in Windows Forms. When the application moves from one display to another, the spell check dialog, which SpellCheckDialog.Show opens, and the options dialog, which OptionsDialog opens, change their scaling while they are shown. They do the same when the user changes the scale factor of a display while the application runs.

TX Text Control Words with the Spelling dialog twice: small on the left, and on the right scaled to a 4K display, with the misspelled word doucment and the suggestions document, documents and docent.

In the .NET Framework 4.7 and later, this high DPI support must be switched on by the application: you configure it in the application's app.config file.

User Dictionaries

A user dictionary, represented by the class UserDictionary, holds the words that users add, such as names and technical terms, in addition to the dictionary of the language. Version 8.0 changes two things about them.

  • Loading time and memory. Adding a user dictionary takes considerably less time and memory than in version 7.0. Because TX Spell .NET checks against several dictionaries and user dictionaries at the same time, the saving grows with every user dictionary an application loads.
  • Special character flags. Hunspell dictionaries, represented by OpenOfficeDictionary, support flags that define how characters are treated. User dictionaries now support them as well when the flags are defined at the beginning of the user dictionary file, and TX Spell .NET then checks text under these conditions.

The special character flags are WORDCHARS, BREAK and ICONV; The File Format describes what each defines.

Hide a Dictionary From the Options Dialog

The options dialog lists the loaded dictionaries, and users can change them there. Some applications load a dictionary that users should neither see nor change.

The new property ShowInOptionsDialog of Dictionary, the base class of all dictionaries, decides whether a dictionary is listed in the Dictionaries overview of the options dialog. Its default value is true. A dictionary whose property is false is loaded as usual, but it doesn't appear in the dialog box, so users can't edit it there.

Spell Checking in TX Text Control X19

TX Text Control X19, released with TX Spell .NET 8.0, changed when a word counts as misspelled. Earlier versions underlined a word while the user was still typing it. X19 checks a word only once it is completed: when a delimiter such as a space or a period follows it, when the input position moves elsewhere, or when the document loses the focus. The blog article X19 Sneak Peek: Changes for Keyboard Layout and Spell Checking shows both behaviors.

Next Steps

  • Version 9.0: the version that followed.
  • Breaking Changes: what the new behavior of user dictionaries means for an upgrade.
  • Version 7.0: the features of the previous version.
  • Overview: what TX Spell .NET for Windows Forms does and how its dictionaries work.