| Description: |
Here's a small test-case showing the behavior of 'tk::scrollbar':
-----
package require Tk
wm geometry . 300x200+50+50
tk::listbox .listbox -yscrollcommand ".scrollbar set" -height 5
tk::scrollbar .scrollbar -command ".listbox yview" -orient vertical
grid .listbox -column 0 -row 0 -sticky nwes
grid .scrollbar -column 1 -row 0 -sticky ns
grid columnconfigure . 0 -weight 1
grid rowconfigure . 0 -weight 1
for {set i 0} {$i<100} {incr i} {
.listbox insert end "Line $i of 100"
}
-----
Some notes:
- If using the left mouse button you click and hold below the scrollbar thumb, the scrollbar will move page by page until it reaches the location of the mouse cursor.
- The background area below the thumb will change color (usually into black).
But with the themed scrollbar (ttk::scrollbar), the behavior is different:
- When you click and hold below the scrollbar thumb, the scrollbar will move all the way to the bottom, it won't stop to the cursor position.
- The background area below the thumb does not change color.
It seems like ttk::scrollbar has the same issues as e.g. GTK's scrollbar on win32, it doesn't seem to act natively.
|