Skip to content
Advertisement

Tag: tkinter

How to copy, cut folder from one folder to another using ctrl+c and ctrl+v

My title can look a little ambiguous, so here is an explanation. Professional IDE like Pycharm or Visual Studio Code allow copying the folder, navigating to a specific directory and pasting it there. I would also like to implement that. But in my case, shutil.copytree needs 2 arguments – source folder and destination folder. So is there any way that

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 files outside python and then call the script through the windows

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 when i enter thousands of characters.. Am i doing something wrong? or my approach is bad? Answer Try

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 will call another function to complete that part of the form.

Advertisement