styles¶
tkinter styles
Uses ttk Themed Styles
Docs: https://tkdocs.com/tutorial/styles.html List of Themes: https://wiki.tcl-lang.org/page/List+of+ttk+Themes awlight/awdark theme download: https://wiki.tcl-lang.org/page/awthemes Fonts: https://tkdocs.com/tutorial/fonts.html
create_hover(parent)
¶
Create tkinter frame hovering above the current widget
E.G. window_frame, close = create_hover(widget) ttk.Button(window_frame, text='Close', command=close).pack()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
Misc | RootWithStyle
|
tk widget or root |
required |
Returns:
| Type | Description |
|---|---|
|
function close() -> None (releases widget and destroys hover window) |
Source code in mmg_toolbox/tkguis/misc/styles.py
create_root(window_title, parent=None)
¶
Create tkinter root object with style attribute
Source code in mmg_toolbox/tkguis/misc/styles.py
extra_styles(style)
¶
Add additional styles to use on individual ttk components
Source code in mmg_toolbox/tkguis/misc/styles.py
stylename_elements_options(widget)
¶
Function to expose the options of every element associated to a widget stylename.
widget = ttk.Button(None)
class_ = widget.winfo_class()
stylename_elements_options(class_, widget)
Source code in mmg_toolbox/tkguis/misc/styles.py
theme_menu(style)
¶
update_text_style(widget, style)
¶
Update a tk.Text widget with the current style