Home | Libraries | People | FAQ | More |
boost::ui::string_box — Single-line text editor widget.
// In header: <boost/ui/text_box.hpp> class string_box : public boost::ui::text_box_base { public: // construct/copy/destruct explicit string_box(widget &, const uistring & = uistring()); string_box(); // public member functions string_box & placeholder(const uistring &); uistring placeholder() const; };
Usage example:
ui::string_box string_box = ui::string_box(parent, "Initial text"); string_box.on_edit([&] { ui::log::info() << "Edited text: " << string_box.text(); });
See Also:
string_box
public member functionsstring_box & placeholder(const uistring & text);Sets placeholder text into the editor.
uistring placeholder() const;Returns placeholder text from the editor.