.. _ttkwidget: The ttkwidgets Package ====================== I recently learned of this widget package which contains a number of widgets including: + AutoHideScrollbar: Scrollbar that automatically hides when not needed. + Calendar ttk Widget that enables a calender within a frame, allowing the user to select dates. + CheckboxTreeview: ttk.Treeview widget with checkboxes left of each item. + DebugWindow: A Toplevel that shows sys.stdout and sys.stderr for Tkinter applications + ItemsCanvas: A ttk.Frame containing a Canvas upon which text items can be placed with a coloured background. + LinkLabel: A ttk.Label that can be clicked to open a link with a default blue color, a purple color when clicked and a bright blue color when hovering over the Label. + ScaleEntry: A simple combination of a Scale and an Entry widget suitable for use with int ranges. + ScrolledListbox: Simple tk.Listbox with an added scrollbar. + Table: Table widget displays a table with options to drag rows and columns and to sort columns. + TickScale: A ttk.Scale that can display the current value next to the slider and supports ticks. + TimeLine: A Frame containing a Canvas and various buttons to manage a timeline that can be marked with certain events, allowing the binding of commands to hovering over certain elements and creating texts inside the elements. The package documentation can be found at `ttkwidget Documentation `_. The widgets themselves can be found at `ttkwidgets `_. The documentation includes installation and examples. I am just familiarizing myself with these widgets, so I am not in a position to recommend or disparage them. The big disadvantage with ttkwidgets or any widget package is that to use them, the packages have to be installed on all systems on which your application is run. That means that if you distribute your application using them, then all the users have to also install the ttkwidgets package. The widgets in this package can be used as Custom widgets within PAGE. I created an example, see :ref:`cal2` using the Calendar widget from the package but ran into a problem passing into the widget the initial month and year because there I didn't find attributes I could set in the init function of the support module. But looking at the example code for the Calendar widget, I saw that Calendar is instantiated with the following statement: .. sourcecode:: python from ttkwidgets import Calendar calendar = Calendar(window, year=2015, month=3, selectforeground='white', selectbackground='red') So I used the following code in the support module: .. sourcecode:: python from ttkwidgets import Calendar class Cal(Calendar): def __init__(self, master, **kw): Calendar.__init__(self, master, year=2019, month=9, selectforeground='white', selectbackground='red') Custom = Cal And the calendar widget showed September 2019 and behaved as I hoped.