Label

A label widget displays a textual label and/or image.

Constructors

this
this(UiElement parent, string text)

Construct the widget.

this
this(string text)

Construct the widget.

Members

Mixins

__anonymous
mixin Anchor

Mixin common commands.

__anonymous
mixin Color
Undocumented in source.
__anonymous
mixin Font
Undocumented in source.
__anonymous
mixin Justify
Undocumented in source.
__anonymous
mixin Padding
Undocumented in source.
__anonymous
mixin Relief
Undocumented in source.
__anonymous
mixin WrapLength
Undocumented in source.

Mixed In Members

From mixin Anchor

setTextAnchor
auto setTextAnchor(string position)

Specifies how text in the widget is positioned relative to the inner margins.

From mixin Color

setForegroundColor
auto setForegroundColor(string color)

Set the foreground color of the widget.

setBackgroundColor
auto setBackgroundColor(string color)

Set the background color of the widget.

setInsertColor
auto setInsertColor(string color)

Set the insert cursor color of the widget.

From mixin Font

setFont
auto setFont(string font, int size, FontStyle[] styles)

Set the font and style for the widget.

setFont
auto setFont(string fontInfo)

Set the font and style for the widget via a simple string. This method is exists to set the font using the output of the font dialog.

From mixin Justify

setTextAlignment
auto setTextAlignment(string alignment)

Set the alignment of the widget text.

From mixin Padding

setPadding
auto setPadding(int padding)

Set the amount of padding within the widget.

From mixin Relief

setRelief
auto setRelief(string relief)

Set the relief type of the widget.

From mixin WrapLength

setWrapLength
auto setWrapLength(int pixels)

Specifies the maximum line length (in pixels). If this option is less than or equal to zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the specified value.

Inherited Members

From TextWidget

_textVariable
string _textVariable;
Undocumented in source.
_image
Image _image;
Undocumented in source.
setText
auto setText(string text)

Set the widget text.

getText
string getText()

Get the widget text.

setImage
auto setImage(Image image, string imagePosition)

Set the image for this widget.

setImagePosition
auto setImagePosition(string imagePosition)

Change the position of the image in relation to the text.

setTextCharacterWidth
auto setTextCharacterWidth(int characterWidth)

Set the text character width.

destroy
void destroy()

Destroy this widget.

__anonymous
mixin Underline

Mixin common commands.

Examples

auto label = new Label("Text")
	.pack();

Common Commands

These are injected common commands that can also be used with this widget.

Anchor
Color
Font
Justify
Padding
Relief
WrapLength

Additional Events

Additional events that can also be bound to using the bind method.

<<Invoke>>, <<PrevWindow>>, <Key-Tab>, <Key-F10>, <Alt-Key>,

See Also

Meta