SimpleCxxLib
packageclass GTextField : public GInteractor
GActionEvent
if the text field has a nonempty action command.
Constructor | |
GTextField(nChars) | Creates a text field capable of holding nChars characters, which defaults to 10. |
Methods | |
Returns the contents of the text field. | |
Sets the text of the field to the specified string. |
GTextField(); GTextField(int nChars);
nChars
characters,
which defaults to 10. Assigning an action command to the text field
causes it to generate an action event whenever the user types the
ENTER key.
Usage:
GTextField *field = new GTextField(); GTextField *field = new GTextField(nChars);
void setText(string str);
Usage:
field->setText(str);
string getText();
Usage:
string str = field->getText();