Skip to content
Advertisement

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 not defined. I did this all in the shell and I didn’t forget to add from tkinter import *. Could you please

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 possible to change the size of

Why is my Tkinter button not executing my function?

I want the function to display heads or tails(randomly). Instead, the function displays nothing and ignores the function. I have also tried printing the value instead of displaying it on tkinter, but it only shows heads and not tails. If any additional details are needed to solve my issue please comment and I will provide additional details. Answer In the

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() instead

Advertisement