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 {...}{.inline, raises: [], tags: [].}
Gets the state of a 2-state checkbox
proc isChecked(self: wCheckBox): bool {...}{.inline, raises: [], tags: [].}
This is just a maybe more readable synonym for getValue.
proc is3State(self: wCheckBox): bool {...}{.raises: [], tags: [].}
Returns whether or not the checkbox is a 3-state checkbox.
proc get3StateValue(self: wCheckBox): int {...}{.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) {...}{.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) {...}{.inline, raises: [], tags: [].}
Sets the checkbox to the given state.
proc click(self: wCheckBox) {...}{.inline, raises: [], tags: [].}
Simulates the user clicking a checkbox.
proc init(self: wCheckBox; parent: wWindow; id = wDefaultID; label: string = "";
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = wChk2State) {...}{.raises: [
    wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
    wFontError], tags: [RootEffect].}
Initializes a checkbox.
proc CheckBox(parent: wWindow; id = wDefaultID; label: string = ""; pos = wDefaultPoint;
             size = wDefaultSize; style: wStyle = wChk2State): wCheckBox {...}{.inline,
    discardable, raises: [wNilAccess, wWindowError, wCursorError, wBrushError,
                        Exception, IndexDefect, wFontError], tags: [RootEffect].}
Constructor.

Methods

method getBestSize(self: wCheckBox): wSize {...}{.raises: [], tags: [].}
Returns the best acceptable minimal size for the control.
method getDefaultSize(self: wCheckBox): wSize {...}{.raises: [], tags: [].}
Returns the default size for the control.
method release(self: wCheckBox) {...}{.raises: [], tags: [RootEffect].}
Release all the resources during destroying. Used internally.