Skip to content

Tag: tkinter

Assigning color to ttk.Button

I would like to assign color to the background of my button as well as the text of my button. I thought I could assign it with fg and bg but there seems to be no reference at all in ttk.Button. How can I assign text and background color to my button? Error when calling style Answer Python docs explain

Tkinter: Color Chooser on MacOS

The Python Tkinter color chooser does not work in Python Version 3.8.5 on Mac. Whenever I type in colorchooser.askcolor(), It always outputs Traceback (most recent call last): File “<pyshell#5>”, line 1, in <module> colorchooser.askcolor() NameError: name ‘colorchooser’ is …

Tkinter – how to change icon size or make black icon visible

I have two questions: Is it possible to increase somehow size of the icon in tkinter? Because the icon choosen by me is not clear visible when I use root.iconbitmap(..). I also have another icon, but it’s black and is not visible on black taskbar. What can I do? Answer I don’t believe it’s p…

How do I change the colour of my QR code?

I want to make a QR code with python. The output is a white background with a black qr code. How do I change both of them? Answer pyqrcode module has not been updated for over 5 years. Use qrcode module instead. Note that qrcode module requires Pillow module. Note that I pass the photo and subject to showcode…