LineBreakMode

class pyto_ui.LineBreakMode(*values)

Constants that specify what happens when a line is too long for a container.

BY_CHAR_WRAPPING = 1

Wrapping occurs before the first character that doesn’t fit.

BY_CLIPPING = 2

Lines are simply not drawn past the edge of the text container.

BY_TRUNCATING_HEAD = 3

The line is displayed so that the end fits in the container and the missing text at the beginning of the line is indicated by an ellipsis glyph. Although this mode works for multiline text, it is more often used for single line text.

BY_TRUNCATING_MIDDLE = 5

The line is displayed so that the beginning and end fit in the container and the missing text in the middle is indicated by an ellipsis glyph. This mode is used for single-line layout; using it with multiline text truncates the text into a single line.

BY_TRUNCATING_TAIL = 4

The line is displayed so that the beginning fits in the container and the missing text at the end of the line is indicated by an ellipsis glyph. Although this mode works for multiline text, it is more often used for single line text.

BY_WORD_WRAPPING = 0

Wrapping occurs at word boundaries, unless the word itself doesn’t fit on a single line.