ActiveTcl User Guide | ||
gets::spinner pathName ?options? itk::Widget <- iwidgets::La- beledwidget <- iwidgets::Spinner
background borderWidth cursor exportSelection
tions.
tions.
childSitePos command fixed focusCommand
inherited options.
above inherited options.
repeat action on the arrow buttons engages. The default is 300
milliseconds.
the arrow buttons. A repeatinterval of 0 disables button repeat.
_________________________________________________________________
spinner is comprised of an entryfield plus up and down arrow but- tons. Arrows may be drawn horizontally or vertically.
name is pathName. This command may be used to invoke various op- erations on the widget. It has the following general form:
delete get icursor index insert scan selection xview
ods.
childsite clear peek
methods. pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwidgets::spinner command. pathName con*- figure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for path-
list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::spinner command. pathName down Derived classes may overload this method to specialize functionality. pathName up
ality.
spinner. See the canvas widget manual entry for details on the
downarrow component item.
ner. See the canvas widget manual entry for details on the up- arrow component item.
package require Iwidgets 4.0
set months {January February March April May June July \
August September October November December}
proc blockInput {char} {
return 0
}
proc spinMonth {step} {
global months
set index [expr [lsearch $months [.sm get]] + $step]
if {$index < 0} {set index 11}
if {$index > 11} {set index 0}
iwidgets::spinner .sm -labeltext Month : -width 10 -fixed 10 \ -validate blockInput -decrement {spinMonth -1} -increment {spinMonth 1} .sm insert 0 January
pack .sm -padx 10 -pady 10
to spinner arrow buttons. Sue Yockey spinner, widget