Skip to content

Tag: tkinter

Python get filepath

I’m trying to create a simple script to copy the filepath of a selected file (in windows explorer) to the clipboard in python. I’ve been looking at pyperclip and tkinter but I’m unsure how exactly to proceed. The askopenfilename in tkinter seems promising, but I’d like to select the fi…

Python: Tkinter bind(“<>”) works only once

so i was trying out tkinter Text widget.. and made a small code that highlights the word “print” in the text.. CODE: In this, the root.bind(‘<<Modified>>’, get) works only once. i checked it with the line print(“Highlighting…”) it just worked once even whe…

How to align radio buttons in adjacent rows tkinter?

I’m making a GUI in Python tkinter. How can I align these Raidobuttons so that they all line up in one column and the columns are side by side. In particular I’d like my columns to be left right and center but now this is how they are showing up now: This is my code for the radio buttons: Answer

How to make a Tkinter Button change its own text attribute?

Context: this is part of a program I am making that builds a form with Tkinter that respects a specific json schema. It works recursively and build_dict_form in called every time an “object” type (that actually corresponds to the dict type in python) is encountered in the schema. build_rec_form wi…