I’m new to Tkinter and OOP. I’ve been trying to make child class inherit some methods from parent class because I’d have repeated code if I didn’t do it like that. But I’ve stumbled on a problem, caused probably by my limited knowledge of Tkinter and OOP. Here is my code: (itR…
Tag: tkinter
How to get the value of an Entry created in a def?
I’m working on a project and i would like to get the Value of an Entry created in a def (turned on by a button on Tkinter) So I have my main tkinter menu, with a button which will call the def “panier”. The def “panier” is creating the Entry “value” and another button…
When enabling a button, disabling the other
Code: Output: When I click any other button, I get: All buttons get enabled. Question: After I’ve clicked one of the buttons which aren’t disabled, I want this one to get disabled. Let’s say I clicked button button2. Thus, button2 will get disabled as shown: The reason why I haven’t fo…
Accessing variables from other tab in notebook
Hi all, I was unsuccessful with my last question in this group because my code was too long. I have now brought my code to a minimum and added a screenshot. I hope this time everything is clear and not confusing. My question is: how can I check the variable “val” in Tab1 whether it is smaller than…
How to update a frame with a scrollbar linked in it that has buttons so that it updates and works correctly when adding buttons?
I’m writing an application in tkinter which has the following structure: Notebook Tab (frame on the notebook) Canvas (on the frame) SecondFrame (on the canvas) ← this is where I want to pack my buttons MyButtons (on second frame) While scrollbar is linked as expected to my canvas. Lets say I have 20 but…
Two fullscreen tkinter windows on separate monitors on Raspbery Pi 4
I have a simple TK app that runs fullscreen just fine on one monitor, but now I want to run two fullscreen windows, one on each display on a Raspberry Pi 4. The two displays have different resolutions and work fine on their own, but I can’t get two fullscreen windows to work, both windows fullscreen jus…
Slide show program, event processing
I need the images to change if the cursor is inside the window without moving, but I managed to make the image changes only if the cursor is moving inside the window, how can I change the code? Answer You can calculate cursor position in loop and show image if it’s located within tkinter window:
Binding event to combobox selection to display image inside Toplevel window (Tkinter Python)
I am attempting to bind a selection event to items within a combobox to display an image inside a toplevel window once the specified item is selected. The code I have runs without error. However, the images are not displayed upon selecting the items inside the combobox. Any help would be appreciated. Answer T…
tkinter inter-windows drag and drop support
I’m trying to help the owner of tkdnd generate a wheel and distribute it to Pypi so users could simply install the tkdnd extension with a simple pip install TkinterDnD2. I’m after this ‘challange’ for the last two days but could not solve it by myself so far, but I’m sure someone…
Tkinter displaying users choice back to them once they have clicked a button and submitted and submitted
I’m trying to create a form where a user picks a time, and depending on the option they pick. It is then displayed back to the user once they click the submit button. But when i click an option and submit it prints all four options regardless. I also am trying to make it such that once a user clicks