# README for tkstackrpms Stackrpms extensions to Tcl/Tk for Python. These are small useful additions that might not be useful to anyone else. ## Upstream This project's upstream is at ## Alternatives None. Write your own small extensions. ## Reason for existence Some features include: * New widgets: Tooltip, Statusbar * Extended widgets: * Spinbox with mousewheel support * Checkbox that calls function on Enter/Space/MouseButton1 * Entry that calls function on Enter/FocusOut * Radiobutton that allows keyboard navigation through all related (by same variable) radiobuttons: Home, End, Up, Down. * Poor-man's Gtk 3.0 icon name to path resolution * Load image from svg * Function `flash_entry` that cycles through a list of colors, at a provided duration per color. Useful for flashing an error. My added value includes: * The radiobutton keyboard navigation. To make that possible, I had to write a recursive function to find all related radiobuttons (that use the same variable) within this toplevel widget. * A vastly improved flash_entry. * The reimplementation of gtk 3.0 icon path resolution. ## Using Ideally, this would be installable with pip3. But since I don't know how to do that, perhaps just copy [src/tkstackrpms/__init__.py](src/tkstackrpms/__init__.py) to your own project as `tkstackrpms.py`. ## Dependencies For Devuan: * python3-tk * python3-pil.imagetk * python3-cairosvg (OPTIONAL, for svg image support) ## Building ## References ### Building a python package 1. 2. ### Contents Tooltip class [python - How do I display tooltips in Tkinter? - Stack Overflow](https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter/36221216#36221216) Widget that stores a reference to the variable [python - Tkinter widget.cget('variable') - Stack Overflow](https://stackoverflow.com/questions/63871376/tkinter-widget-cgetvariable/63871784#63871784) Status bar [Create a Status Bar in Tkinter - CodersLegacy](https://coderslegacy.com/python/create-a-status-bar-in-tkinter/) Mouse wheel on spinbox without ttk [user interface - Enable mouse wheel in Spinbox Tk Python - Stack Overflow](https://stackoverflow.com/questions/38329996/enable-mouse-wheel-in-spinbox-tk-python) Flashing text box (entry widget) [python - How to make a flashing text box in tkinter? - Stack Overflow](https://stackoverflow.com/questions/27533244/how-to-make-a-flashing-text-box-in-tkinter/78277443#78277443) ### General reference file:///usr/include/X11/keysymdef.h https://insolor.github.io/effbot-tkinterbook-archive/tkinter-events-and-bindings.htm [python - Callback function tkinter button with variable parameter - Stack Overflow](https://stackoverflow.com/questions/19693782/callback-function-tkinter-button-with-variable-parameter)