CheckButton

A checkbutton widget is used to show or change a setting. It has two states, selected and deselected. The state of the checkbutton may be linked to a value.

Constructors

this
this(UiElement parent, string text)

Construct the widget.

this
this(string text)

Construct the widget.

Members

Functions

check
auto check()

Check the check button.

halfCheck
auto halfCheck()

Only half check the check button. This is a kind of halfway state.

isChecked
bool isChecked()

Check if the check button is checked or not.

setOffValue
auto setOffValue(string value)

Set the value of the unchecked state.

setOnValue
auto setOnValue(string value)

Set the value of the checked state.

unCheck
auto unCheck()

Uncheck the check button.

Mixins

__anonymous
mixin Invoke

Mixin common commands.

__anonymous
mixin Command
Undocumented in source.
__anonymous
mixin Value!(this._valueVariable, string)
Undocumented in source.

Mixed In Members

From mixin Invoke

invokeCommand
auto invokeCommand()

Invoke the command associated with the widget.

From mixin Command

setCommand
auto setCommand(CommandCallback callback)

Add a command to a widget.

removeCommand
auto removeCommand()

Remove a previously set command.

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 checkButton = new CheckButton("Text")
	.setCommand(delegate(CommandArgs arg){ ... })
	.check()
	.pack();

Common Commands

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

Command
Invoke
Value

Additional Events

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

<<Invoke>>, <<PrevWindow>>, <Alt-Key>, <B1-Enter>, <B1-Leave>, <Button-1>, <ButtonRelease-1>, <Enter>, <Key-F10>, <Key-Tab>, <Key-space>, <Leave>,

States: This widget does not respond to user input if the disabled state is set. The widget sets the selected state whenever the value is set to the widget's on-value, and clears it otherwise. The widget sets the alternate state whenever the value is unset. (The alternate state may be used to indicate a "tri-state" or "indeterminate" selection.)

Styles: Check button widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars.

See Also

Meta