A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark).
Appearance: | |
Styles: | Styles | Description |
wChk2State | Create a 2-state checkbox. This is the default. |
wChk3State | Create a 3-state checkbox. |
wChkAlignRight | Makes the text appear on the left of the checkbox. |
|
Events: | wCommandEventwCommandEvent | Description |
wEvent_CheckBox | The check box is clicked. |
|
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.
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.