Class Fox::FXSpinner
In: rdoc-sources/FXSpinner.rb
Parent: FXPacker

Spinner control

Events

The following messages are sent by FXSpinner to its target:

SEL_KEYPRESS:sent when a key goes down; the message data is an FXEvent instance.
SEL_KEYRELEASE:sent when a key goes up; the message data is an FXEvent instance.
SEL_COMMAND:sent whenever the spinner‘s value changes; the message data is an integer indicating the new spinner value.
SEL_CHANGED:sent whenever the text in the spinner‘s text field changes; the message data is an integer indicating the new spinner value.

Spinner options

SPIN_NORMAL:Normal, non-cyclic
SPIN_CYCLIC:Cyclic spinner
SPIN_NOTEXT:No text visible
SPIN_NOMAX:Spin all the way up to infinity
SPIN_NOMIN:Spin all the way down to -infinity

Message identifiers

ID_INCREMENT:x
ID_DECREMENT:x
ID_ENTRY:x

Methods

Attributes

cursorColor  [RW]  Cursor color [FXColor]
downArrowColor  [RW]  Color of the "down" arrow [FXColor]
font  [RW]  Text font for this spinner [FXFont]
helpText  [RW]  Status line help text for this spinner [String]
numColumns  [RW]  Number of columns (i.e. width of spinner‘s text field, in terms of number of columns of ‘m’) [Integer]
range  [RW]  Spinner range (low and high values) [Range]
selBackColor  [RW]  Background color for selected text [FXColor]
selTextColor  [RW]  Foreground color for selected text [FXColor]
spinnerStyle  [RW]  Spinner style [Integer]
textColor  [RW]  Normal text color [FXColor]
tipText  [RW]  Tool tip text for this spinner [String]
upArrowColor  [RW]  Color of the "up" arrow [FXColor]
value  [RW]  Current value [Integer]

Public Class methods

Return an initialized FXSpinner instance.

Parameters:

p:the parent window for this spinner [FXComposite]
cols:number of columns to display in the text field [Integer]
target:the message target, if any, for this spinner [FXObject]
selector:the message identifier for this spinner [Integer]
opts:the options [Integer]
x:initial x-position [Integer]
y:initial y-position [Integer]
width:initial width [Integer]
height:initial height [Integer]
padLeft:internal padding on the left side, in pixels [Integer]
padRight:internal padding on the right side, in pixels [Integer]
padTop:internal padding on the top side, in pixels [Integer]
padBottom:internal padding on the bottom side, in pixels [Integer]

Public Instance methods

Set to cyclic mode, i.e. wrap around at maximum/minimum.

Return true if the spinner is in cyclic mode.

Decrement spinner

Decrement spinner by certain amount

Set the "editability" of this spinner‘s text field.

Return true if the spinner‘s text field is editable.

Get the spinner increment value.

Increment spinner

Increment spinner by certain amount

Change the spinner increment value, i.e. the amount by which the spinner‘s value increases when the up arrow is clicked.

Set the visibility of this spinner‘s text field.

Return true if this spinner‘s text field is visible.

[Validate]