This module provides some modified widgets of Tkinter which works better on macOS and some more useful functions and classes as well. For example Button of tkmacosx which looks and feels exactly like a native tkinter button can change its background and foreground color on a mac and can do much more.
Read more about all the classes and methods of tkmacosx on tkmacosx documentation.
- Button Widget
- SFrame Widget
- Colorscale Widget
- Marquee Widget
- ColorVar Variable
- DictVar Variable
- SaveVar
- get_shade
- check_appearance
Use the package manager pip to install tkmacosx.
pip install tkmacosxOr install the latest repo
pip install git+https://github.com/Saadmairaj/tkmacosx#egg=tkmacosxfrom tkinter import *
from tkmacosx import Button, ColorVar, Marquee, Colorscale
root = Tk()
var = ColorVar(value='pink')
root['bg'] = var
m = Marquee(root, left_margin=30, bg= var, initial_delay=2000,
text='Welcome to tkmacosx!! Slide the slider to change color :)')
m.pack(pady=(10,0))
b = Button(root, text='Button', borderless=1, fg=var, bg='black')
b.pack(pady=10)
c = Colorscale(root, variable=var, value='hex', height=25, mousewheel=0)
c.pack(pady=(0,10))
root.mainloop()python -m tkmacosxWhen contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method of this repository before making a change.
Please make sure to update tests as appropriate.

