LabelFrame

A label frame widget is a container used to group other widgets together. It has an optional label, which may be a plain text string or another widget.

Constructors

this
this(UiElement parent, string text)

Construct the widget.

this
this(string text)

Construct the widget.

Members

Functions

setLabel
auto setLabel(Widget widget)

Set a widget to use for the label. The widget must be a child of the labelframe widget or one of the labelframe's ancestors, and must belong to the same top-level widget as the labelframe. If set, overrides the text parameter.

Mixins

__anonymous
mixin Anchor!("-labelanchor")

Mixin common commands.

__anonymous
mixin Height
Undocumented in source.
__anonymous
mixin Padding
Undocumented in source.
__anonymous
mixin Text
Undocumented in source.
__anonymous
mixin Underline
Undocumented in source.
__anonymous
mixin Width
Undocumented in source.

Mixed In Members

From mixin Height

setHeight
auto setHeight(int height)

Set the height of the widget if the geometry manager allows.

From mixin Padding

setPadding
auto setPadding(int padding)

Set the amount of padding within the widget.

From mixin Text

getText
string getText()

Get the widget text.

setText
auto setText(string text)

Get the index where the insert cursor is.

From mixin Underline

underlineChar
auto underlineChar(int index)

Underline one of the characters in the widget text.

From mixin Width

setWidth
auto setWidth(int width)

Set the width of the widget if the geometry manager allows.

Inherited Members

From Widget

setState
auto setState(string[] state)

Set the widget's state.

getState
string[] getState()

Get the widget's state.

inState
bool inState(string[] state)

Test if a widget is in a particular state.

removeState
auto removeState(string[] state)

Remove the widget's state.

resetState
auto resetState()

Reset the widget's state to default.

setStyle
auto setStyle(string style)

Set the widget's style.

getStyle
string getStyle()

Get the widget's style.

setKeyboardFocus
auto setKeyboardFocus(string focus)

Set if the widget can recieve focus during keyboard traversal.

getKeyboardFocus
string getKeyboardFocus()

Get if the widget can recieve focus during keyboard traversal.

pack
auto pack(int outerPadding, int innerPadding, string side, string fill, string anchor, bool expand)

Geometry method for loosely placing this widget inside its parent using a web browser model. Widgets flow around each other in the available space.

grid
auto grid(int column, int row, int outerPadding, int innerPadding, int columnSpan, int rowSpan, string sticky)

Geometry method for placing this widget inside its parent using an imaginary grid. Somewhat more direct and intuitive than pack. Choose grid for tabular layouts, and when there's no good reason to choose something else.

place
auto place(int xPos, int yPos, int width, int height, string anchor, string borderMode)

Geometry method for placing this widget inside its parent using absolute positioning.

place
auto place(double relativeXPos, double relativeYPos, double relativeWidth, double relativeHeight, string anchor, string borderMode)

Geometry method for placing this widget inside its parent using relative positioning. In this case the position and size is specified as a floating-point number between 0.0 and 1.0 relative to the height of the parent. 0.5 means the widget will be half as high as the parent and 1.0 means the widget will have the same height as the parent, and so on.

Examples

auto labelFrame = new LabelFrame("Text")
	.pack(0, 10);

// Add a button to the label frame.
auto button = new Button(labelFrame, "Text")
	.pack();

Common Commands

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

Anchor
Height
Padding
Text
Underline
Width

Additional Events

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

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

See Also

Meta