diff options
Diffstat (limited to 'doc/spinbox.n')
-rw-r--r-- | doc/spinbox.n | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/doc/spinbox.n b/doc/spinbox.n index a2e7d05..f44d145 100644 --- a/doc/spinbox.n +++ b/doc/spinbox.n @@ -23,6 +23,7 @@ spinbox \- Create and manipulate 'spinbox' value spinner widgets \-foreground \-justify \-xscrollcommand \-highlightbackground \-relief \-highlightcolor \-repeatdelay +\-placeholder \-placeholderforeground .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-buttonbackground buttonBackground Background @@ -54,7 +55,8 @@ as it will format a floating-point number. A floating-point value corresponding to the lowest value for a spinbox, to be used in conjunction with \fB\-to\fR and \fB\-increment\fR. When all are specified correctly, the spinbox will use these values to control its -contents. This value must be less than the \fB\-to\fR option. +contents. If this value is greater than the \fB\-to\fR option, then +\fB\-from\fR and \fB\-to\fR values are automatically swapped. If \fB\-values\fR is specified, it supersedes this option. .OP "\-invalidcommand or \-invcmd" invalidCommand InvalidCommand Specifies a script to eval when \fB\-validatecommand\fR returns 0. Setting @@ -83,7 +85,8 @@ be displayed in a different color, depending on the values of the A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When all are specified correctly, the spinbox will use these values to control -its contents. This value must be greater than the \fB\-from\fR option. +its contents. If this value is less than the \fB\-from\fR option, then +\fB\-from\fR and \fB\-to\fR values are automatically swapped. If \fB\-values\fR is specified, it supersedes this option. .OP \-validate validate Validate Specifies the mode in which validation should operate: \fBnone\fR, @@ -106,7 +109,7 @@ option has precedence over the \fB\-from\fR and \fB\-to\fR range. .OP \-width width Width Specifies an integer value indicating the desired width of the spinbox window, in average-size characters of the widget's font. -If the value is less than or equal to zero, the widget picks a +If the value is negative or zero, the widget picks a size just large enough to hold its current text. .OP \-wrap wrap wrap Must be a proper boolean value. If on, the spinbox will wrap around the @@ -221,7 +224,7 @@ Also, the \fB-validate\fR option will set itself to \fBnone\fR when the spinbox value gets changed because of adjustment of \fB-from\fR or \fB-to\fR and the \fB-validatecommand\fR returns false. For instance .CS - \fIspinbox pathName \-from 1 \-to 10 \-validate all \-vcmd {return 0}\fR + \fIspinbox pathName \-from 1 \-to 10 \-validate all \-validatecommand {return 0}\fR .CE will in fact set the \fB-validate\fR option to \fBnone\fR because the default value for the spinbox gets changed (due to the \fB-from\fR and \fB-to\fR @@ -236,7 +239,7 @@ The \fBspinbox\fR command creates a new Tcl command whose name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS -\fIpathName option \fR?\fIarg arg ...\fR? +\fIpathName option \fR?\fIarg ...\fR? .CE \fIOption\fR and the \fIarg\fRs determine the exact behavior of the command. @@ -285,6 +288,9 @@ or .QW \fBsel.f\fR . In general, out-of-range indices are automatically rounded to the nearest legal value. +Indexes support the same simple interpretation as +for the command \fBstring index\fR, with simple integer index +arithmetic and indexing relative to \fBend\fR. .SS SUBCOMMANDS .PP The following commands are possible for spinbox widgets: @@ -467,15 +473,16 @@ way through the text appears at the left edge of the window. \fIpathName \fBxview scroll \fInumber what\fR This command shifts the view in the window left or right according to \fInumber\fR and \fIwhat\fR. -\fINumber\fR must be an integer. -\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation +\fINumber\fR must be an integer or a float, but if it is a float then +it is converted to an integer, rounded away from 0. +\fIWhat\fR must be either \fBpages\fR or \fBunits\fR or an abbreviation of one of these. -If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by -\fInumber\fR average-width characters on the display; if it is -\fBpages\fR then the view adjusts by \fInumber\fR screenfuls. -If \fInumber\fR is negative then characters farther to the left +If \fIwhat\fR is \fBpages\fR then the view adjusts by \fInumber\fR +screenfuls. If \fInumber\fR is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. +If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by +\fInumber\fR average-width characters on the display. .RE .SH "DEFAULT BINDINGS" .PP |