Description
So I've been using the ttkwidgets
library for a quite a long time, and I have some improvement, and modification ideas I'd like to share here. Unfortunately(?), it got a bit long.
Improvement ideas:
FontChooser:
- Add a
master
option to the dialog, and make the chooser windowtransient
- Change the
sunken
relief tosolid
to flatten it and make it look less 90-ish - Add an
AutocompleteEntryListbox
instead of aLabel & Listbox
for improve search (like in tkFontChooser) - Change the example text to something more useful, kikeThe quick brown fox (if it fits)
ColorChooser:
- For appropriateness, change the
HTML
label toHex
- I recommend replacing the custom-styled
tk.Spinboxes
with attk.Spinbox
- Add hex tooltips to the color-preset labels
- For flatness, change the frame reliefs to
solid
- I would consider moving the 'Ok' and 'Cancel' buttons to the left side because it's much more common and handy if they are on the left
- It would be good to have a regular indicator on the alphabar, and gradientbar, sometimes it's hard to spot the black line
Calendar:
If you don't delete it:
- Create a 'Today' button
- Change the 'Previous' and 'Next' buttons to arrows, with
Toolbutton
style - I found a calendar widget here that uses many keyboard shortcuts for navigation, this can also be useful
LinkLabel:
- Change the default hover-cursor from
hand1
tohand2
, it looks native (yes, even on Linux :). Maybepointerhand
on the Mac.
ItemsCanvas:
- Change the movement cursor from
exchange
tofleur
, it looks much more "moving"
ToolTip:
I agree with @dogeek (Merge Tooltip from tkinterpp) tooltips usually have no title, and images. Today, tooltips look like this:
GitHub:
WinUI:
So, I would change this widget, because the current one doesn't look too good, and modern.
To display title labels and images, maybe buttons, TeachingTips
are used these days, not ToolTips
Inconsistencies:
I think it’s a very good idea to collect widgets from various authors, but I think they should be standardized somehow. For example, there are very striking differences between askfont
and askcolor
, like that Askfont
doesn't support master, askcolor
do, but calls it parent
(note that Tkinter uses master
).
New widget ideas:
Here I couldn’t really decide what would fit in ttkwidgets
because I don’t know what the concept of ttkwidgets actualky is.
- To help with more complex widgets, or
- to simplify the use of Tkinter with even basic widgets like a menubar.
I think this second would be better because most people use Tkinter because they need a GUI, and for that, it's better to have such basic widgets at their disposal as well.
Simple widgets:
- Switch
- ToggleButton
- AutoarrangeFrame - this is a very useful widget if you want to create a responsive gui (and usually you want)
Entries:
- On-screen keyboard for entries. Example:
- Placeholder text for entries (perhaps with a hook like
tooltips
) - Tag entry
Not sure:
- ContextMenu / PopupMenu
- Menubar
Complex widgets:
- TimePicker
- Toolbar
- Statusbar / Infobar
- RichTextbox (with formatting-toolbar, or context menu with copy, paste, and formatting)
- Custom messageboxes
This is a very good and useful package, so keep going!