+ 9
How can I refresh whole tkinter window by clicking on a button?
from tkinter import * root = Tk() root.geometry ("660x625") def refresh () : # code goes here refresh_button= Button(root, text="Refresh",command =refresh,font='bold', width=6) refresh_button.pack(anchor=center)
7 Respostas
+ 2
Dan Priest Will try. Thanks
+ 1
Pariket Thakur I don't use frame in my project so it will not work
+ 1
Ion Kare On clicking upon button data will change without exiting the program.
For example -
You were asked to input some data then data will store in CSV file and by using Treeview of tkinter it can be display in the form of table in GUI form but it will not show the data after you entered something. You have to exit the program and run it again to show the data. By refresh button you will not need to exit the program.
+ 1
You could kill the root and call it again. May not be the right way, but it will appear as a refresh.
0
"python 3.x - Refresh a tkinter frame on button press - Stack Overflow" https://stackoverflow.com/questions/45064732/refresh-a-tkinter-frame-on-button-press
Or
"How do I refresh tkinter window totally in python with a refresh button - Stack Overflow" https://stackoverflow.com/questions/30507167/how-do-i-refresh-tkinter-window-totally-in-python-with-a-refresh-button
0
What do you mean by refresh
0
Use Window.update() feature