diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-18 13:17:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-18 13:17:50 (GMT) |
commit | 91fa6a052ce0aa2ace9b52fde257d69a9cd8de29 (patch) | |
tree | 2958a908785958b394f6a33cb9a60066c9e1f80f | |
parent | abb10324cfd83661d93763814ea5a3974ab69e7e (diff) | |
parent | 8e1ed7cc7e018ee8d5b1d1157861381c0c483682 (diff) | |
download | tk-91fa6a052ce0aa2ace9b52fde257d69a9cd8de29.zip tk-91fa6a052ce0aa2ace9b52fde257d69a9cd8de29.tar.gz tk-91fa6a052ce0aa2ace9b52fde257d69a9cd8de29.tar.bz2 |
merge core-8-6-branch
-rw-r--r-- | library/ttk/combobox.tcl | 3 | ||||
-rw-r--r-- | tests/ttk/combobox.test | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl index 03821a2..6ceccef 100644 --- a/library/ttk/combobox.tcl +++ b/library/ttk/combobox.tcl @@ -368,7 +368,8 @@ proc ttk::combobox::PlacePopdown {cb popdown} { set y [winfo rooty $cb] set w [winfo width $cb] set h [winfo height $cb] - set postoffset [ttk::style lookup TCombobox -postoffset {} {0 0 0 0}] + set style [$cb cget -style] + set postoffset [ttk::style lookup $style -postoffset {} {0 0 0 0}] foreach var {x y w h} delta $postoffset { incr $var $delta } diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test index a31b3bd..3c40892 100644 --- a/tests/ttk/combobox.test +++ b/tests/ttk/combobox.test @@ -45,6 +45,15 @@ test combobox-2.4 "current -- value not in list" -body { test combobox-2.end "Cleanup" -body { destroy .cb } +test combobox-3 "Read postoffset value dynamically from current style" -constraints unix -body { + ttk::combobox .cb -values [list a b c] -style "DerivedStyle.TCombobox" + pack .cb -expand true -fill both + ttk::style configure DerivedStyle.TCombobox -postoffset [list 25 0 0 0] + ttk::combobox::Post .cb + winfo x .cb.popdown +} -result 25 -cleanup { + destroy .cb +} test combobox-1890211 "ComboboxSelected event after listbox unposted" -body { # whitebox test... |