summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-16 20:48:25 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-16 20:48:25 (GMT)
commita37e83a81134ff99c59bfeaced00218a0d318be3 (patch)
treea9af4338dee522868e59329cd9e9ea9055a2b93b
parent8777af2f8e6d1d7df3a1f1bb21bd17f42371eb22 (diff)
downloadtk-a37e83a81134ff99c59bfeaced00218a0d318be3.zip
tk-a37e83a81134ff99c59bfeaced00218a0d318be3.tar.gz
tk-a37e83a81134ff99c59bfeaced00218a0d318be3.tar.bz2
Fixed bug [1520118fff] - -validate resets to none
-rw-r--r--doc/spinbox.n12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/spinbox.n b/doc/spinbox.n
index 8ae6161..34b7014 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 \fBtextVariable\fR for read-only purposes will
never cause problems. The danger comes when you try set the
\fBtextVariable\fR to something that the \fBvalidateCommand\fR would not
-accept, which causes \fBvalidate\fR to become \fInone\fR (the
+accept, which causes \fBvalidate\fR to become \fBnone\fR (the
\fBinvalidCommand\fR will not be triggered). The same happens
when an error occurs evaluating the \fBvalidateCommand\fR.
.PP
@@ -216,6 +216,16 @@ in the \fBvalidateCommand\fR or \fBinvalidCommand\fR (whichever one you
were editing the spinbox widget from). It is also recommended to not set an
associated \fBtextVariable\fR during validation, as that can cause the
spinbox widget to become out of sync with the \fBtextVariable\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