Scrollable containers for some GUI toolkits
Project description
Scrollable containers which just work!
If you have developed GUI applications, you probably know the pain of designing a clean front-end only to find that your application window is too large for your client's screen. Making the content scrollable is not straightforward (at least in Tkinter). Especially not after you have already written a lot of code to draw the content.
You can use ScrollableContainers
to reduce headaches. Run the following command to install the package.
pip install ScrollableContainers
ScrollableFrameTk
A full implementation of a scrollable frame in Tkinter.
- Handles resize events correctly.
- Horizontally centres the contents if the window is wider.
- Supports scrolling with the mouse wheel and touchpad.
- Scrolling the mouse wheel or swiping vertically with two fingers on the touchpad triggers a vertical scroll.
- Scrolling the mouse wheel while holding down Shift or swiping horizontally with two fingers on the touchpad triggers a horizontal scroll.
Usage
Add widgets to the frame
attribute of a ScrollableFrameTk
object.
See examples.
Notes
'<Button-4>'
, '<Button-5>'
and '<MouseWheel>'
are bound to all widgets using bind_all
to handle mouse wheel
scroll events. Do not unbind_all
(or bind_all
another function to) these three sequences!
ScrollablePanelWx
A thin wrapper around wx.lib.scrolledpanel.ScrolledPanel
.
- Does everything the aforementioned class does.
- Horizontally centres the contents if the window is wider.
Usage
Add widgets to the panel
attribute of a ScrollablePanelWx
object.
See examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ScrollableContainers-1.0a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3389c62250ae1242bd663365ba1e2c14c51301eb4f7233235db9d2afb553031 |
|
MD5 | badf8c9476b280d751f2ea63f56aa5ea |
|
BLAKE2b-256 | bae852af8adbb72f753f58e242d519fa7807d7e78d913a769ca0234c723e3471 |
Hashes for ScrollableContainers-1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d06fdf68f2b24791b966b196860b49af3af0fecc3aad3b3033005e0c1d0a2a |
|
MD5 | 238135ded17a5674da9071ef388c2d67 |
|
BLAKE2b-256 | 8d13e4c679d36d557ee9d89d81a9f403d814e35ce32cddbb0dd1d11ff203454b |