diff options
author | fvogel <fvogelnew1@free.fr> | 2016-01-18 18:43:27 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-01-18 18:43:27 (GMT) |
commit | 65f1c08a6b543a6c25ad704beb200541fc7f6a94 (patch) | |
tree | 3218325dd629d3be5ef6bc5eff5c7b473685a7aa | |
parent | 60426c4ec3415ab57206d57f49f672f407b94a86 (diff) | |
download | tk-65f1c08a6b543a6c25ad704beb200541fc7f6a94.zip tk-65f1c08a6b543a6c25ad704beb200541fc7f6a94.tar.gz tk-65f1c08a6b543a6c25ad704beb200541fc7f6a94.tar.bz2 |
Reverted [5f396dacdc].
-rw-r--r-- | generic/tkListbox.c | 1 | ||||
-rw-r--r-- | tests/listbox.test | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 04dab6f..c7effdd 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -3642,6 +3642,7 @@ static int GetMaxOffset( maxOffset = 0; } + maxOffset -= maxOffset % listPtr->xScrollUnit; return maxOffset; } diff --git a/tests/listbox.test b/tests/listbox.test index 76a4349..40041de 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -509,6 +509,28 @@ test listbox-3.18b {ListboxWidgetCmd procedure, "bbox" option, justified, non-de destroy .top.l .top unset -nocomplain lres res } -result {1} +test listbox-3.18c {ListboxWidgetCmd procedure, "bbox" option, justified, with x scrolling} -setup { + destroy .top.l .top.hs .top + +} -body { +package req Tk +destroy .top.l .top.hs .top + toplevel .top + listbox .top.l -justify right -borderwidth 7 -highlightthickness 10 -selectborderwidth 20 + scrollbar .top.hs -command ".top.l xview" -orient horizontal + .top.l configure -xscrollcommand ".top.hs set" + set huge [concat "START -" [string repeat "Huge Item... " 20] "- END"] + .top.l insert end VeryVeryLongItem1 AnEvenMuchVeryVeryLongerItem2 $huge ShortItem3 + pack .top.l -expand 1 -fill both + pack .top.hs -expand 1 -fill x + update + +<TODO> finish write this test case + +} -cleanup { + destroy .top.l .top.hs .top + +} -result {} test listbox-3.19 {ListboxWidgetCmd procedure, "cget" option} -body { .l cget } -returnCodes error -result {wrong # args: should be ".l cget option"} |