AFXFloatSpinner

Convenience class for creating a labeled spinner. The label field can be a label or check button (AFXFLOATSPINNER_CHECKBUTTON option).


AFXFloatSpinner(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 in the spinner.
labelTextString Label preceeding spinner.
tgtFXObjectNoneMessage target.
selInt0Message ID.
optsInt0Options and hints.
xInt0X coordinate of origin.
yInt0Y coordinate of origin.
wInt0Width of the widget.
hInt0Height of the widget.
plIntDEFAULT_PADLeft padding.
prIntDEFAULT_PADRight padding.
ptIntDEFAULT_PADTop padding.
pbIntDEFAULT_PADBottom padding.


canFocus()

Returns True if the spinner can recieve focus.

Reimplemented from FXWindow.


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 floats (low, high) representing the widget's allowable minimum and maximum values.


getTipText()

Returns the tool tip message.


getValue()

Returns the spinner value.


isCheckStateChanged()

Returns True if the state of the check button or the radio button has changed by the user since it was programmatically set last time.


isEditable()

Returns True if the input field of spinner may be edited.


isReadOnlyState()

Returns True if the spinner is set to the read-only state.


setCheck(state)

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

ArgumentTypeDefaultDescription
stateBool Button 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 of spinner.

ArgumentTypeDefaultDescription
editBoolTrueEditable state.


setHelpText(text)

Sets the status line help text.

ArgumentTypeDefaultDescription
textString Help text.


setIncrement(incr)

Sets the spinner increment.

ArgumentTypeDefaultDescription
incrFloat 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
lowFloat Minimum value.
highFloat Maximum value.


setReadOnlyState(edit=True)

Sets the read-only state of the spinner.

ArgumentTypeDefaultDescription
editBoolTrueRead-only state.


setTipText(text)

Sets the tool tip message.

ArgumentTypeDefaultDescription
textString Tooltip text.


setValue(val, notify=False)

Sets the spinner value.

ArgumentTypeDefaultDescription
valFloat 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 float spinner options.

AFXFLOATSPINNER_CHECKBUTTON

Use a check button instead of a label.

AFXFLOATSPINNER_RADIOBUTTON

Use a radio button instead of a label.

AFXFLOATSPINNER_VERTICAL

Orient label or button above spinner.

AFXFLOATSPINNER_READONLY

Configure spinner to the read-only state.