Skip to content

Improvement ideas for ttkwidgets #74

Open
@rdbende

Description

@rdbende

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:

image

  • Add a master option to the dialog, and make the chooser window transient
  • Change the sunken relief to solid to flatten it and make it look less 90-ish
  • Add an AutocompleteEntryListbox instead of a Label & Listbox for improve search (like in tkFontChooser)
  • Change the example text to something more useful, kikeThe quick brown fox (if it fits)

ColorChooser:

image

  • For appropriateness, change the HTML label to Hex
  • I recommend replacing the custom-styled tk.Spinboxes with a ttk.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
    image

Calendar:

image

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:

image

  • Change the default hover-cursor from hand1 to hand2, it looks native (yes, even on Linux :). Maybe pointerhand on the Mac.

ItemsCanvas:

image

  • Change the movement cursor from exchange to fleur, it looks much more "moving"

ToolTip:

image
I agree with @dogeek (Merge Tooltip from tkinterpp) tooltips usually have no title, and images. Today, tooltips look like this:
GitHub:
image
WinUI:
image

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
image
image

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:
    image
  • 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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions