diff options
author | fvogel <fvogel@noemail.net> | 2015-10-22 21:53:38 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2015-10-22 21:53:38 (GMT) |
commit | c40339028754199a07927e1de2fc1b7ea1e7d563 (patch) | |
tree | 7dc0e42744c89ac077de0aec88e89f4c82d5eece /doc | |
parent | 75b031bc78273a01f740228b115f43982ee5d23e (diff) | |
parent | 2425d052703587624de9f8594d3fae8f9a167eca (diff) | |
download | tk-c40339028754199a07927e1de2fc1b7ea1e7d563.zip tk-c40339028754199a07927e1de2fc1b7ea1e7d563.tar.gz tk-c40339028754199a07927e1de2fc1b7ea1e7d563.tar.bz2 |
Fixed bug [1520118fff] - -validate resets to none
FossilOrigin-Name: c020d102aaaec1ea5875444221dc86da79600cbc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/spinbox.n | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/spinbox.n b/doc/spinbox.n index 1e8cb3a..7227cf1 100644 --- a/doc/spinbox.n +++ b/doc/spinbox.n @@ -196,7 +196,7 @@ dangerous to mix. Any problems have been overcome so that using the the spinbox widget. Using the \fB\-textvariable\fR for read-only purposes will never cause problems. The danger comes when you try set the \fB\-textvariable\fR to something that the \fB\-validatecommand\fR would not -accept, which causes \fB\-validate\fR to become \fInone\fR (the +accept, which causes \fB\-validate\fR to become \fBnone\fR (the \fB\-invalidcommand\fR will not be triggered). The same happens when an error occurs evaluating the \fB\-validatecommand\fR. .PP @@ -216,6 +216,16 @@ in the \fB\-validatecommand\fR or \fB\-invalidcommand\fR (whichever one you were editing the spinbox widget from). It is also recommended to not set an associated \fB\-textvariable\fR during validation, as that can cause the spinbox widget to become out of sync with the \fB\-textvariable\fR. +.PP +Also, the \fBvalidate\fR option will set itself to \fBnone\fR when the +spinbox value gets changed because of adjustment of \fBfrom\fR or \fBto\fR +and the \fBvalidateCommand\fR returns false. For instance +.CS + \fIspinbox pathName \-from 1 \-to 10 \-validate all \-vcmd {return 0}\fR +.CE +will in fact set the \fBvalidate\fR option to \fBnone\fR because the default +value for the spinbox gets changed (due to the \fBfrom\fR and \fBto\fR +options) to a value not accepted by the validation script. .SH "WIDGET COMMAND" .PP The \fBspinbox\fR command creates a new Tcl command whose |