| PyGTK Tutorial | ||
|---|---|---|
| <<< Previous | Chapter 8. Range Widgets | Next >>> |
It may take a little while to get used
to, but by default, scrollbars as well as scale widgets can take the keyboard
focus in GTK. If you think your users will find this too confusing, you
can always disable this by unsetting the CAN_FOCUS flag on the
scrollbar, like this:
scrollbar.unset_flags(CAN_FOCUS) |
The key bindings (which are, of course, only active when the widget has focus) are slightly different between horizontal and vertical range widgets, for obvious reasons. They are also not quite the same for scale widgets as they are for scrollbars, for somewhat less obvious reasons (possibly to avoid confusion between the keys for horizontal and vertical scrollbars in scrolled windows, where both operate on the same area).
The user can also move the slider all the way to one end or the other of the trough using the keyboard. With the VScale widget, this is done with the Home and End keys, whereas with the VScrollbar widget, this is done by typing Control-Page Up and Control-Page Down.
| <<< Previous | Home | Next >>> |
| Common Range Functions | Up | Example |