I want to make a label that keeps counting how many times the user typed a certain word(in this case “1r#”) in a ScrolledText without needing to make a button to update the label. Can I make a loop? If so, how could I do it? Every word the program will look for are three characters long, if it helps.
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 do i make a button in tkinter update the display page to something else
i’m working on a login system, so i made the display with two buttons Login and Sign up button so i want to make a new page appears when the user clicks one the buttons for example if he clicks on Login the page will update to a page with entry boxes of the credentials and the same thing with
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 can I condense this Python Tkinter GUI input code?
I’m taking part in Code in Place 2021 and for my final project I developed a Madlibs generator using Python and Tkinter, and the code is functional and works the way I want it to, but obviously it’s pretty long and convoluted. I was hoping some of you guys could offer some suggestions on how to make my code more
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.
How to create a proper CheckButton in Tkinter?
Im trying to create a CheckButton in tkinter based on the items I have in my equipment list. The CheckButton has been created but not all the items that are in equipment are visible in the app. Is it because my items are to large? This is my code: This is how the tkinter app looks like: Answer This happens,
How do i get string from Entry in tkinter? I use .get(), but it only returns 0
I have trouble returning results from Entry in tkinter. I do not use it immediately after creating tne Entry: This code creates commands for enchanting minecraft items. As you can see, i have 34 entrys so I decided to store their parameters as a list of lists. In the end of the program, when i wanted to get the numbers