A static text control displays one or more lines of read-only text.
StaticText supports the three classic text alignments, label ellipsization i.e. replacing parts of the text with the ellipsis (”...”) if the label doesn’t fit into the provided space and also formatting markup with Control.SetLabelMarkup .
This class supports the following styles:
See also
__init__ | Default constructor. |
Create | Creation function, for two-step construction. |
IsEllipsized | Returns True if the window styles for this control contains one of the ST_ELLIPSIZE_START , ST_ELLIPSIZE_MIDDLE or ST_ELLIPSIZE_END styles. |
Wrap | This functions wraps the controls label so that each of its lines becomes at most width pixels wide if possible (the lines are broken at words boundaries so it might not be the case if words are too long). |
A static text control displays one or more lines of read-only text.
Possible constructors:
StaticText()
StaticText(parent, id=ID_ANY, label='', pos=DefaultPosition,
size=DefaultSize, style=0, name=StaticTextNameStr)
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, label=’‘, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticTextNameStr)
Constructor, creating and showing a text control.
Parameters: |
|
---|
See also
Creation function, for two-step construction.
For details see StaticText .
Parameters: | |
---|---|
Return type: | bool |
Returns True if the window styles for this control contains one of the ST_ELLIPSIZE_START , ST_ELLIPSIZE_MIDDLE or ST_ELLIPSIZE_END styles.
Return type: | bool |
---|
This functions wraps the controls label so that each of its lines becomes at most width pixels wide if possible (the lines are broken at words boundaries so it might not be the case if words are too long).
If width is negative, no wrapping is done. Note that this width is not necessarily the total width of the control, since a few pixels for the border (depending on the controls border style) may be added.
Parameters: | width (int) – |
---|
New in version 2.6.2.