LineEdit

A LineEdit is an editor of a single line of text, comparable to a HTML <input type="text" />.

A CustomLineEdit always uses the custom implementation, even on operating systems where the native control is implemented in minigui, which may provide more api styling features but at the cost of poorer integration with the OS and potentially worse user experience in other ways.

Constructors

this
this(Widget parent)

Inherited Members

From EditableTextWidget

wordWrapEnabled
void wordWrapEnabled(bool enabled)

Enables or disables wrapping of long lines on word boundaries.

selectAll
void selectAll()

Selects all the text in the control, as if the user did it themselves. When the user types in a widget, the selected text is replaced with the new input, so this might be useful for putting in default text that is easy for the user to replace.

copy
void copy()
cut
void cut()
paste
void paste()

Basic clipboard operations.

undo
void undo()
content
string content [@property getter]
string content [@property setter]

Gets or sets the current content of the control, as a plain text string. Setting the content will reset the cursor position and overwrite any changes the user made.

addText
void addText(string txt)

Appends some text to the widget at the end, without affecting the user selection or cursor position.

See Also

PasswordEdit for a LineEdit that obscures its input.

TextEdit for a multi-line plain text editor widget.

TextLabel for a single line piece of static text.

TextDisplay for a read-only display of a larger piece of plain text.

Meta