|
NAMEiwidgets::spinner - Create and manipulate a spinner widgetSYNOPSISiwidgets::spinner pathName ?options?INHERITANCEitk::Widget <- iwidgets::Labeledwidget <- iwidgets::SpinnerSTANDARD OPTIONSbackground borderWidth cursor exportSelection foreground highlightColor highlightThickness insertBackground insertBorderWidth insertOffTime insertOnTime insertWidth justify relief selectBackground selectBorderWidth selectForeground textVariable See the "options" manual entry for details on the standard options. ASSOCIATED OPTIONSshow state See the "entry" manual entry for details on the associated options. INHERITED OPTIONSchildSitePos command fixed focusCommand invalid textBackground textFont validate width See the "entryfield" widget manual entry for details on the above inherited options. disabledForeground labelBitmap labelFont labelImage labelMargin labelPos labelText labelVariable state sticky See the "labeledwidget" widget manual entry for details on the above inherited options. WIDGET-SPECIFIC OPTIONSName: arrowOrient Class: Orient Command-Line Switch: -arroworient
Name: decrement Class: Command Command-Line Switch: -decrement
Name: increment Class: Command Command-Line Switch: -increment
Name: repeatDelay Class: RepeatDelay Command-Line Switch: -repeatdelay
Name: repeatInterval Class: RepeatInterval Command-Line Switch: -repeatinterval
DESCRIPTIONThe iwidgets::spinner command creates a spinner widget. The spinner is comprised of an entryfield plus up and down arrow buttons. Arrows may be drawn horizontally or vertically.METHODSThe iwidgets::spinner command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for spinner widgets: ASSOCIATED METHODSdelete get icursor index insert scan selection xview See the "entry" manual entry for details on the associated methods. INHERITED METHODSchildsite clear peek See the "entryfield" manual entry for details on the associated methods. WIDGET-SPECIFIC METHODS
COMPONENTSName: downarrow Class: Canvas
Name: uparrow Class: Canvas
EXAMPLEpackage 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} .sm delete 0 end .sm insert 0 [lindex $months $index] } 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 ACKNOWLEDGEMENTS:Ken Copeland <ken@hilco.com>
AUTHORSue YockeyKEYWORDSspinner, widget
Visit the GSP FreeBSD Man Page Interface. |