wxStaticText

wxStaticText

wxStaticText
Functions for wxStaticText class

A static text control displays one or more lines of read-only text. wxStaticText 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 wxControl::SetLabelMarkup() (not implemented in wx).

Styles

This class supports the following styles:

See: wxStaticBitmap, wxStaticBox

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxStaticText

Types

Returns the control's label, as it was passed to wxControl:setLabel/2.

Note that the returned string may contains mnemonics ("&" characters) if they were passed to the wxControl:setLabel/2 function; use GetLabelText() (not implemented in wx) if they are undesired.

Also note that the returned string is always the string which was passed to wxControl:setLabel/2 but may be different from the string passed to SetLabelText() (not implemented in wx) (since this last one escapes mnemonic characters).

Types

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.

See: wxControl:setLabel/2

Types

Width = integer()

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.

Since: 2.6.2