wSpinCtrl

wSpinCtrl combines wTextCtrl and wSpinButton in one control.

Appearance:
Superclass:wControl
Styles:
StylesDescription
wSpReadOnlyThe value will not be user-editable.
wSpLeftThe text is left aligned (this is the default).
wSpCenterThe text is centered.
wSpRightThe text is right aligned.
wSpArrowKeysThe value wraps at the minimum and maximum.
wSpWrapThe user can use arrow keys to change the value.
Events:wSpinEvent wCommandEvent
wSpinEventDescription
wEvent_SpinPressing an arrow changed the spin button value. This event can be vetoed.
wEvent_SpinUpPressing up/right arrow changed the spin button value. This event can be vetoed.
wEvent_SpinDownPressing down/left arrow changed the spin button value. This event can be vetoed.
wCommandEventDescription
wEvent_TextWhen the text changes.
wEvent_TextEnterWhen pressing Enter key.

Consts

wSpReadOnly = 0x00000800
wSpLeft = 0x00000000
wSpCenter = 0x00000001
wSpRight = 0x00000002
wSpArrowKeys = 1152921504606846976
wSpWrap = 2305843009213693952

Procs

proc getBase(self: wSpinCtrl): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the numerical base being currently used, 10 by default.
proc setBase(self: wSpinCtrl; base: int) {...}{.validate, property, inline, raises: [],
                                      tags: [].}
Sets the base to use for the numbers in this control, 10 or 16.
proc getRange(self: wSpinCtrl): Slice[int] {...}{.validate, property, inline, raises: [],
    tags: [].}
Gets range of allowable value.
proc setRange(self: wSpinCtrl; min: int; max: int) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets range of allowable values.
proc setRange(self: wSpinCtrl; range: Slice[int]) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets range of allowable values.
proc getMin(self: wSpinCtrl): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets minimal allowable value.
proc getMax(self: wSpinCtrl): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets maximal allowable value.
proc getValue(self: wSpinCtrl): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the value of the spin control.
proc getText(self: wSpinCtrl): string {...}{.validate, property, inline, raises: [], tags: [].}
Gets the text of the spin control.
proc setValue(self: wSpinCtrl; value: int) {...}{.raises: [], tags: [].}
Sets the value of the spin control.
proc setValue(self: wSpinCtrl; text: string) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the value of the spin control.
proc setText(self: wSpinCtrl; text: string) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the text of the spin control. The same as setValue().
proc setSelection(self: wSpinCtrl; range: Slice[int]) {...}{.validate, property, inline,
    raises: [], tags: [].}
Select the text in the text part of the control.
proc getUpdownHandle(self: wSpinCtrl): HANDLE {...}{.validate, property, inline, raises: [],
    tags: [].}
Gets the system handle of the updown control.
proc final(self: wSpinCtrl) {...}{.raises: [], tags: [].}
Default finalizer for wSpinCtrl.
proc init(self: wSpinCtrl; parent: wWindow; id = wDefaultID; value: string = "0";
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = wSpLeft) {...}{.validate,
    raises: [], tags: [].}
Initializer.
proc SpinCtrl(parent: wWindow; id = wDefaultID; value: string = "0"; pos = wDefaultPoint;
             size = wDefaultSize; style: wStyle = wSpLeft): wSpinCtrl {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor, creating and showing a spin control. Value as text.
proc SpinCtrl(parent: wWindow; id = wDefaultID; value: int; pos = wDefaultPoint;
             size = wDefaultSize; style: wStyle = wSpLeft): wSpinCtrl {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor, creating and showing a spin control. Value as int.

Methods

method show(self: wSpinCtrl; flag = true) {...}{.inline, raises: [], tags: [].}
Shows or hides the control.
method getDefaultSize(self: wSpinCtrl): wSize {...}{.property, raises: [], tags: [].}
Returns the default size for the control.
method getBestSize(self: wSpinCtrl): wSize {...}{.property, raises: [], tags: [].}
Returns the best acceptable minimal size for the control.