TextWidget::SetText
Defined in:
Sets the text stored in a text widget.
C4Widgets.h
Prototype
virtual void SetText(const char *text, int32 max = 0);
Parameters
text |
A pointer to the text to store in the text widget. This can be nullptr .
|
max |
The maximum number of characters that are copied into the text widget. If this is zero, then there is no limit to the length of the text. |
Description
The SetText
function sets the text stored in a text widget. If the text
parameter is not nullptr
, then the string that it points to is copied into the text widget. If the text
parameter is nullptr
, then any text previously stored in the text widget is deleted.The
max
parameter specifies the maximum number of individual characters that are copied into the text widget. This may not be the same as the number of bytes that are copied because a single character can occupy multiple bytes in the UTF-8 format. If max
is set to zero, then there is no limit to the number of characters.
See Also