wCheckBox

A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark).

Appearance:
Superclass:wControl
Styles:
StylesDescription
wChk2StateCreate a 2-state checkbox. This is the default.
wChk3StateCreate a 3-state checkbox.
wChkAlignRightMakes the text appear on the left of the checkbox.
Events:wCommandEvent
wCommandEventDescription
wEvent_CheckBoxThe check box is clicked.

Consts

wChk2State = 0
wChk3State = 0x00000006
wChkAlignRight = 544
wChkUnchecked = 0x00000000
wChkChecked = 0x00000001
wChkUndetermined = 0x00000002

Procs

proc getValue(self: wCheckBox): bool {...}{.validate, property, inline, raises: [], tags: [].}
Gets the state of a 2-state checkbox
proc isChecked(self: wCheckBox): bool {...}{.validate, inline, raises: [], tags: [].}
This is just a maybe more readable synonym for getValue.
proc is3State(self: wCheckBox): bool {...}{.validate, raises: [], tags: [].}
Returns whether or not the checkbox is a 3-state checkbox.
proc get3StateValue(self: wCheckBox): int {...}{.validate, property, inline, raises: [],
                                        tags: [].}
Gets the state of a 3-state checkbox. Returned value can be one of wChkUnchecked, wChkChecked, or wChkUndetermined.
proc set3StateValue(self: wCheckBox; state: int) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the checkbox to the given state. State can be one of wChkUnchecked, wChkChecked, or wChkUndetermined.
proc setValue(self: wCheckBox; state: bool) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the checkbox to the given state.
proc click(self: wCheckBox) {...}{.validate, inline, raises: [], tags: [].}
Simulates the user clicking a checkbox.
proc final(self: wCheckBox) {...}{.raises: [], tags: [].}
Default finalizer for wCheckBox.
proc init(self: wCheckBox; parent: wWindow; id = wDefaultID; label: string = "";
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = wChk2State) {...}{.validate,
    raises: [], tags: [].}
Initializer.
proc CheckBox(parent: wWindow; id = wDefaultID; label: string = ""; pos = wDefaultPoint;
             size = wDefaultSize; style: wStyle = wChk2State): wCheckBox {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor, creating and showing a checkbox

Methods

method getBestSize(self: wCheckBox): wSize {...}{.property, raises: [], tags: [].}
Returns the best acceptable minimal size for the control.
method getDefaultSize(self: wCheckBox): wSize {...}{.property, raises: [], tags: [].}
Returns the default size for the control.