A simple class derived from lib.stattext that implements auto-wrapping behaviour depending on the parent size.
New in version 0.9.5.
__init__ | Defsult class constructor. |
OnSize | Handles the 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 |
A simple class derived from lib.stattext that implements auto-wrapping behaviour depending on the parent size.
New in version 0.9.5.
Defsult class constructor.
Parameters: |
|
---|
Handles the EVT_SIZE event for AutoWrapStaticText.
Parameters: | event – a SizeEvent event to be processed. |
---|
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 PyControl.
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.