Century Embedded Technologies Nano-X SDK and Developer's Guide | ||
---|---|---|
Prev | Chapter 9. Common Widgets and Attributes | Next |
FLTK provides several text widgets for displaying and receiving text:
Fl_Input - A standard one-line text input field
Fl_Output - A standard one-line text output field
Fl_Multiline_Input - A standard multi-line text input field
Fl_Multiline_Output - A standard multi-line text output field
The Fl_Output and Fl_Multiline_Output widgets allow the user to copy text from the output field but not change it.
The value() method is used to get or set the string that is displayed:
Fl_Input *input = new Fl_Input(x, y, width, height, "label"); input->value("Now is the time for all good men...");
The string is copied to the widget's own storage when you set the value() of the widget.