Tk Source Code

Check-in [eff8237f]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Documented what listbox-3.18b intends to test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-441
Files: files | file ages | folders
SHA1:eff8237f4d330b36a3cdd064ede6d6cda5de6d7d
User & Date: fvogel 2016-01-18 10:19:24
Context
2016-01-18
18:17
Removed attempt of adjustment of the startup xview according to the -justify option. Anyway this does not work. check-in: 87072faf user: fvogel tags: tip-441
10:19
Documented what listbox-3.18b intends to test. check-in: eff8237f user: fvogel tags: tip-441
10:08
Use GetMaxOffset when possible to reduce code duplication. The change in ListboxScanTo is not exactly equivalent but I believe the previous version was a bug. check-in: 3bb0cf88 user: fvogel tags: tip-441
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/listbox.test.

481
482
483
484
485
486
487




488
489
490
491
492
493
494
    {58 5 34 14} {38 22 74 14} {22 39 106 14}  \
    {111 5 34 14} {71 22 74 14} {39 39 106 14} \
]
test listbox-3.18b {ListboxWidgetCmd procedure, "bbox" option, justified, non-default borderwidth} -setup {
    destroy .top.l .top
    unset -nocomplain lres res
} -body {




    toplevel .top
    listbox .top.l -justify left -borderwidth 17 -highlightthickness 19 -selectborderwidth 22
    .top.l insert end Item1 LongerItem2 MuchLongerItem3
    .top.l selection set 1
    pack .top.l
    update
    lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]







>
>
>
>







481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
    {58 5 34 14} {38 22 74 14} {22 39 106 14}  \
    {111 5 34 14} {71 22 74 14} {39 39 106 14} \
]
test listbox-3.18b {ListboxWidgetCmd procedure, "bbox" option, justified, non-default borderwidth} -setup {
    destroy .top.l .top
    unset -nocomplain lres res
} -body {
    # This test checks whether all "x" values from bbox for different size
    # items with different justification settings are all positive or zero
    # This checks a bit the calculation of this x value with non-default
    # borders widths of the listbox
    toplevel .top
    listbox .top.l -justify left -borderwidth 17 -highlightthickness 19 -selectborderwidth 22
    .top.l insert end Item1 LongerItem2 MuchLongerItem3
    .top.l selection set 1
    pack .top.l
    update
    lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]