#include <WLineEdit>
Public Types | |
enum | EchoMode { Normal, Password } |
Enum that describes how the contents is displayed. More... | |
Public Member Functions | |
WLineEdit (WContainerWidget *parent=0) | |
Construct a line edit with empty content and optional parent. | |
WLineEdit (const WString &content, WContainerWidget *parent=0) | |
Construct a line edit with given content and optional parent. | |
void | setTextSize (int chars) |
Specify the width of the line edit in number of characters. | |
int | textSize () const |
Get the current width of the line edit in number of characters. | |
void | setText (const WString &text) |
Change the content of the line edit. | |
const WString & | text () const |
Get the current content. | |
void | setEchoMode (EchoMode echoMode) |
Set the echo mode. | |
EchoMode | echoMode () const |
Get the echo mode. | |
WValidator::State | validate () |
Validate the field. |
WLineEdit is an inline widget.
To act upon text changes, connect a slot to the changed() signal. This signal is emitted when the user changed the content, and subsequently removes the focus from the line edit.
To act upon editing, connect a slot to the WInteractWidget::keyWentUp signal.
At all times, the current content may be accessed with the text() method.
int Wt::WLineEdit::textSize | ( | ) | const [inline] |
void Wt::WLineEdit::setEchoMode | ( | EchoMode | echoMode | ) |
Set the echo mode.
The default echo mode is Normal.