Wt::Ext::LineEdit Class Reference

A single line edit. More...

#include <Ext/LineEdit>

Inheritance diagram for Wt::Ext::LineEdit:

Inheritance graph
[legend]

List of all members.

Public Types

enum  EchoMode { Normal, Password }
 Enum that describes how the contents is displayed. More...

Public Member Functions

 LineEdit (WContainerWidget *parent=0)
 Create a new line edit with empty content.
 LineEdit (const WString &content, WContainerWidget *parent=0)
 Construct a line edit with given content.
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 &value)
 Change the content of the line edit.
const WStringtext () const
 Get the current content.
void setEchoMode (EchoMode echoMode)
 Set the echo mode.
EchoMode echoMode () const
 Get the echo mode.
virtual WValidator::State validate ()
 Validate the field.

Public Attributes

EventSignal
< WKeyEvent > & 
keyWentDown
 Event signal emitted when a keyboard key is pushed down.
EventSignal
< WKeyEvent > & 
keyPressed
 Event signal emitted when a keyboard key is pressed.
EventSignal
< WKeyEvent > & 
keyWentUp
 Event signal emitted when a keyboard key is released.


Detailed Description

A single line edit.

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 keyWentUp signal.

At all times, the current content may be accessed with the text() method.

The API is a super-set of the WLineEdit API.


Member Enumeration Documentation

enum Wt::Ext::LineEdit::EchoMode

Enum that describes how the contents is displayed.

See also:
setEchoMode

echoMode

Enumerator:
Normal  Characters are shown.
Password  Hide the contents as for a password.


Member Function Documentation

int Wt::Ext::LineEdit::textSize (  )  const

Get the current width of the line edit in number of characters.

See also:
setTextSize(int)

void Wt::Ext::LineEdit::setEchoMode ( EchoMode  echoMode  ) 

Set the echo mode.

The default echo mode is Normal.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:01 2008 for Wt by doxygen 1.5.3