GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing docs.wxpython.org — wx.StaticText — wxPython 4.3.2 Docs
|
Default constructor. |
|
Creation function, for two-step construction. |
|
Returns |
|
Change the label shown in the control. |
|
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). |
Class API¶Possible constructors:
StaticText() -> None StaticText(parent, id=ID_ANY, label='', pos=DefaultPosition, size=DefaultSize, style=0, name=StaticTextNameStr) -> None
A static text control displays one or more lines of read-only text.
__init__ (self)
Default constructor.
None
__init__ (self, parent, id=ID_ANY, label=’’, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticTextNameStr)
Constructor, creating and showing a text control.
parent (wx.Window) – Parent window. Should not be nullptr.
id (wx.WindowID) – Control identifier. A value of -1 denotes a default value.
label (string) – Text label.
pos (wx.Point) – Window position.
size (wx.Size) – Window size.
style (long) – Window style. See wx.StaticText.
name (string) – Window name.
None
See also
Creation function, for two-step construction.
For details see wx.StaticText.
variant (WindowVariant)
Returns True if the window styles for this control contains one of the ST_ELLIPSIZE_START , ST_ELLIPSIZE_MIDDLE or ST_ELLIPSIZE_END styles.
bool
Change the label shown in the control.
Notice that since wxWidgets 3.1.1 this function is guaranteed not to do anything if the label didn’t really change, so there is no benefit to checking if the new label is different from the current one in the application code.
label (string)
None
See also
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.
Notice that currently this function doesn’t support markup in the label. If it is called after wx.Control.SetLabelMarkup , the markup is stripped and only the resulting text is wrapped, so any formatting set by SetLabelMarkup is lost. This limitation may be removed in the future.
width (int)
None
Added in version 2.6.2.