Summary: I searched the internet about additional themes for tkinter. I found ttkthemes – ThemedTk option. However, my app is created within class. The difference between the example shown in the module website, the themedtk example is applied with root method. Here is the code: When I run the application and the click the style and choose a style. I
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
Update ttk.ProgressBar defined in other class Python
I have a main class for my GUI, where i create a ttk.ProgressBar: I have a class for each page of my Notebook and i want update my progressbar when i run a function in my page2, I tried: But I get the error message : I simplified the code for be the most generalist possible. How can I do
How do I change a listbox view in my python Tkinter project to a tree view
I tried to use tree view to display the data of my project output but consistently got below error for all the button clicks I then switched to Listbox view and I was able to execute my project with no errors, all data being displayed, scrollbar working and select working perfectly. How I want to use the tree view and
How to highlight whole syntax(including every modules’s Keywords,class,etc.) of python in text widget in python tkinter
I am creating code editor, I want to highlight every code properly. I have created a code to highlight code and I have created a different function to highlight string and comments but when I type any code from which already contain some color to highlight doesn’t show string color inside “” but I want only that code show it’s
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
How to use input/command from selected button tkinter python
This may be tricky but I’ll try to put it clear. i have created two buttons, 1st button search folder and select individual filename as input, 2nd button select folder and take its directory as input and read all its files inside. I want to create 3rd button(Execute) where it should know which button i selected and based on that