wx.lib.agw.infobar.AutoWrapStaticText¶A simple class derived from lib.stattext that implements auto-wrapping
behaviour depending on the parent size.
New in version 0.9.5.
Methods Summary¶__init__ |
Defsult class constructor. |
OnSize |
Handles the wx.EVT_SIZE event for AutoWrapStaticText. |
SetLabel |
Sets the AutoWrapStaticText label. |
Wrap |
This functions wraps the controls label so that each of its lines becomes at |
Class API¶AutoWrapStaticText(StaticText)¶A simple class derived from lib.stattext that implements auto-wrapping
behaviour depending on the parent size.
New in version 0.9.5.
__init__(self, parent, label)¶Defsult class constructor.
| Parameters: |
|
|---|
OnSize(self, event)¶Handles the wx.EVT_SIZE event for AutoWrapStaticText.
| Parameters: | event – a wx.SizeEvent event to be processed. |
|---|
SetLabel(self, label, wrapped=False)¶Sets the AutoWrapStaticText label.
All “&” characters in the label are special and indicate that the following character is
a mnemonic for this control and can be used to activate it from the keyboard (typically
by using Alt key in combination with it). To insert a literal ampersand character, you
need to double it, i.e. use “&&”. If this behaviour is undesirable, use SetLabelText instead.
| Parameters: |
|
|---|
Note
Reimplemented from wx.Control.
Wrap(self, width)¶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.
| Parameters: | width (integer) – the maximum available width for the text, in pixels. |
|---|
Note
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.