AFXSpinner

This class contains a label that precedes a spin box that allows the user to specify a value by clicking on its arrow buttons.


AFXSpinner(p, ncols, labelText, tgt=None, sel=0, opts=0, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD)

Constructor.

ArgumentTypeDefaultDescription
pFXComposite Parent widget.
ncolsInt Number of columns.
labelTextString Label string.
tgtFXObjectNoneMessage target.
selInt0Message ID
optsInt0Options and hints.
xInt0X coordinate of the origin.
yInt0Y coordinate of the origin.
wInt0Width of the widget.
hInt0Height of the widget.
plIntDEFAULT_PADLeft padding (margin).
prIntDEFAULT_PADRight padding (margin).
ptIntDEFAULT_PADTop padding (margin).
pbIntDEFAULT_PADBottom padding (margin).


create()

Creates the spinner.

Reimplemented from FXComposite.


disable()

Disables the spinner.

Reimplemented from FXWindow.


enable()

Enables the spinner.

Reimplemented from FXWindow.


getCheck()

Returns the state of the check button or the radio button.


getHelpText()

Returns the status line help text.


getIncrement()

Returns the spinner increment.


getLabelFont()

Returns the label font.


getLabelText()

Returns the label string.


getRange()

Returns a sequence of ints (low, high) representing the widget's allowable minimum and maximum values.


getTipText()

Returns the tool tip message.


getValue()

Returns the spinner value.


isEditable()

Returns True if the text in the text field may be edited.


isReadOnlyState()

Returns True if the spinner appears in the read-only state.


setCheck(state)

Sets the state of the check button or the radio button.

ArgumentTypeDefaultDescription
stateBool State.


setCheckButtonSelector(sel)

Sets the message ID of the check button or the radio button.

ArgumentTypeDefaultDescription
selInt Selector.


setCheckButtonTarget(tgt)

Sets the message target of the check button or the radio button.

ArgumentTypeDefaultDescription
tgtFXObject Target.


setEditable(edit=True)

Sets the editable state for the input field.

ArgumentTypeDefaultDescription
editBoolTrueIf True, input field is editable.


setHelpText(text)

Sets the status line help text.

ArgumentTypeDefaultDescription
textString Help text.


setIncrement(incr)

Sets the spinner increment.

ArgumentTypeDefaultDescription
incrInt Increment.


setLabelFont(fnt)

Sets the label font.

ArgumentTypeDefaultDescription
fntFXFont Label font.


setLabelText(txt)

Sets the label string.

ArgumentTypeDefaultDescription
txtString Label text.


setRange(low, high)

Sets the spinner range.

ArgumentTypeDefaultDescription
lowInt Minimum value.
highInt Maximum value.


setReadOnlyState(readonly=True)

Sets the read-only state of the spinner.

ArgumentTypeDefaultDescription
readonlyBoolTrueState.


setTipText(text)

Sets the tool tip message.

ArgumentTypeDefaultDescription
textString Tooltip text.


setValue(val, notify=False)

Sets the spinner's value.

ArgumentTypeDefaultDescription
valInt Value.
notifyBoolFalseNotification flag.


Class flags

ID_BUTTON

ID for the check or radio button.

ID_SPINNER

ID for the spinner.


Global flags

Flags for AFX spinner options.

AFXSPINNER_CHECKBUTTON

Use a check button instead of a label.

AFXSPINNER_RADIOBUTTON

Use a radio button instead of a label.

AFXSPINNER_VERTICAL

Orient label or button above spinner.

AFXSPINNER_READONLY

Configure spinner to the read-only state.