diff options
| author | erikleunissen <elns@xs4all.nl> | 2024-12-23 08:12:57 (GMT) |
|---|---|---|
| committer | erikleunissen <elns@xs4all.nl> | 2024-12-23 08:12:57 (GMT) |
| commit | 6eb089a1774d7c9817c228b269d314a94a45978e (patch) | |
| tree | 24e251b1bdf2ad260855b381a21d17842e5bcdfc /tests/scrollbar.test | |
| parent | e33b0d1c70a46553eeff136ae95c9506ef08f9a7 (diff) | |
| download | tk-prototype1.zip tk-prototype1.tar.gz tk-prototype1.tar.bz2 | |
Make setting of command prefix for -[xy]scrollcommand more efficientprototype1
Diffstat (limited to 'tests/scrollbar.test')
| -rw-r--r-- | tests/scrollbar.test | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 298a28e..eb1078c 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -14,6 +14,8 @@ tcltest::loadTestedCommands # Import utility procs for specific functional areas namespace import -force ::tk::test::scroll::* +set scrollCmdPrefix [list scrollInfo set] + proc getTroughSize {w} { if {[testConstraint testmetrics]} { # Only Windows has [testmetrics] @@ -135,7 +137,7 @@ test scrollbar-2.5 {Tk_ScrollbarCmd procedure} -setup { destroy .s } -result .s -scrollbar .s -orient vertical -command [list scrollInfo set] -highlightthickness 2 -bd 2 +scrollbar .s -orient vertical -command $scrollCmdPrefix -highlightthickness 2 -bd 2 pack .s -side right -fill y update test scrollbar-3.1 {ScrollbarWidgetCmd procedure} { @@ -758,6 +760,7 @@ catch {destroy .t} # CLEANUP # +unset scrollCmdPrefix namespace forget ::tk::test::scroll::* cleanupTests return |
