summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2016-09-22 13:42:38 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2016-09-22 13:42:38 (GMT)
commit1b5c660e330eddb121d8400dafafffa917beeb46 (patch)
tree373cfc06c2da26845745150dfa87d2244e6e1651 /tests/ttk
parent17993a942afc2c375f311dd73083e4f1d3339dab (diff)
downloadtk-1b5c660e330eddb121d8400dafafffa917beeb46.zip
tk-1b5c660e330eddb121d8400dafafffa917beeb46.tar.gz
tk-1b5c660e330eddb121d8400dafafffa917beeb46.tar.bz2
Correct expansion of the spinbox textarea for the vista theme.
The spinbox textarea should stretch to fill the widget and does so with all except the vista theme. Added a test to check for this expansion to avoid regression. Fix identified Kumba on StackOverflow ( https://stackoverflow.com/a/36393680/291641 )
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/spinbox.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 32b77af..08f2bda 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -199,6 +199,27 @@ test spinbox-2.4 "current command -- value not in list" -constraints nyi -setup
destroy .sb
} -result -1
+test spinbox-3.0 "textarea should expand to fill widget" -setup {
+ set SBV 5
+ set ::spinbox_test {}
+ ttk::spinbox .sb -from 0 -to 10 -textvariable SBV
+} -body {
+ grid .sb -sticky ew
+ grid columnconfigure . 0 -weight 1
+ bind . <Map> {
+ after idle {
+ wm geometry . "210x80"
+ after 100 {set ::spinbox_test [.sb identify element 5 5]}
+ }
+ bind . <Map> {}
+ }
+ after 500 {set ::spinbox_wait 1} ; vwait ::spinbox_wait
+ set ::spinbox_test
+} -cleanup {
+ destroy .sb
+ unset -nocomplain ::spinbox_test SBV
+} -result {textarea}
+
# nostomp: NB intentional difference between ttk::spinbox and tk::spinbox;
# see also #1439266
#