tkinter

How to display the result of a formula in a tkinter Entry textbox

How to display the result of a formula in a tkinter Entry textbox Question: I`’m building a GUI for an engineering software that I’ve created and, being a beginner on Python, I’m having trouble with the code. I’ll try to simplify my problem and describe what I want to do: Using Python and Tkinter, I …

Total answers: 2

How to put iconbitmap on a CustomTkinter TopLevel?

How to put iconbitmap on a CustomTkinter TopLevel? Question: This is the code example: class ToplevelWindow(customtkinter.CTkToplevel): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.geometry("400×300") self.title("New Window") self.resizable(False, False) self.iconbitmap(‘icon.ico’) self.after(100, self.lift) class App(customtkinter.CTk): def __init__(self): super().__init__() self.geometry("550×150") self.title("Title") self.resizable(False, False) logo_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_images") self.logo = customtkinter.CTkImage( Image.open(os.path.join(logo_path, "MCB.png")), size=(90, 54)) self.labelimage = customtkinter.CTkLabel(master=self, text=None, image=self.logo) …

Total answers: 1

Is it possible to place widgets off window?

Is it possible to place widgets off window? Question: My question is simple – is it possible to place widgets out of bounds? For example, I want a button to be not on tkinter.Tk, but it will be somewhere else like in the center of monitor. Asked By: ColorfulYoshi || Source Answers: tkinter.Tk are only …

Total answers: 1

python tkinter getting text value from selected radiobutton

python tkinter getting text value from selected radiobutton Question: I have a radiobuttons, for user to select. On each selection it gives to Entry widget some text. Now, I want to get the text value from the radiobutton which is selected. As I remember checkboxes have true or false values, but I used radio buttons …

Total answers: 1

Why is there extra space after the last column in a Tkinter application?

Why is there extra space after the last column in a Tkinter application? Question: I’m trying to build an application in Tkinter. When the user presses a button, I need 3 widgets to appear in certain rows and columns. When the user clicks again, I need 3 more widgets (of the same types) to appear …

Total answers: 1

How to terminate a tkinter loop and use a returned value

How to terminate a tkinter loop and use a returned value Question: I’ve setup a GUI to collect a file location. I then went to terminate the tkinter loop so I can use the submitted value to generate a file. With my current setup below the loop is not terminating. I’ve had a few goes …

Total answers: 1

Python/Tkinter: fine points about super init and self

Python/Tkinter: fine points about super init and self Question: Following is very simple code to create a frame and label as a class: class FrameWithLabel(tk.Frame): def __init__(self, parent): super().__init__(self, parent) self.label = tk.Label(self) I have two questions: In an earlier post, it was explained to me why the super init was required (in this case, …

Total answers: 1

Python Tkinter Images Tearing On Scroll

Python Tkinter Images Tearing On Scroll Question: I’m working on a project to create a GUI application to display images as clickable buttons in Tkinter. I have the functionality completed where the images appear in a scroll-able grid on the GUI. However, when scrolling up or down there is terrible screen tearing with the images. …

Total answers: 3