TX Spell .NET for Windows Forms

Hyphenation

Topic

Hyphenation divides a word that doesn't fit at the end of a line instead of moving it to the next line as a whole. TX Spell .NET for Windows Forms hyphenates in 24 languages, with the same component that checks spelling. Use it in two ways: automatically in a TX Text Control editor, or in your own code for any text.

How Hyphenation Works

The rules for dividing words come from hyphenation lists, one file per language in the open source Hunspell format. The NuGet package brings the list for US English; the lists for other languages are part of the language archives Text Control offers for download.

TX Text Control Words with a document whose lines end in divided words such as Win-dows, prop-erties and documenta-.

In a TextControl, the connected TXSpellChecker divides the last word of each full line with the list of the word's language, while the user types. In code, TXSpell and TXSpellChecker return the positions at which a word can be divided, and your code decides what to do with them.

Find the Right Page

If you want toRead
Know where hyphenation lists come from, which languages have one, and how to change their settingsHyphenation Lists
Hyphenate the text of a TX Text Control editor automaticallyHyphenation with TX Text Control
Get the hyphenation points of a word in codeHyphenating Text in Code
Let users change the hyphenation settingsOptions Dialog
Find out why words aren't hyphenatedDictionaries Not Found

Where to Start

  1. Hyphenation with TX Text Control, if your application has a TX Text Control editor: two properties turn hyphenation on.
  2. Hyphenation Lists, before you hyphenate a language other than US English.
  3. Hyphenating Text in Code, for text that isn't in an editor.

Pages in This Section

  • Hyphenation Lists: the files, the languages that have one, how a list is chosen, its settings and loading it in code.
  • Hyphenation with TX Text Control: turning hyphenation on, the ribbon, the language of the text and the HyphenateWord event.
  • Hyphenating Text in Code: GetHyphenationPoints and GetHyphenationPoint in a console application, and the hyphenation sample of the setup.