Python Forum
[Tkinter] Tkinter delete values in Entries, when I'm changing the Frame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Tkinter delete values in Entries, when I'm changing the Frame
#1
First of all, I am sorry if I do not comply with the optimal formalities in my first question.

I have programmed a GUI with several windows with Tkinter. Each of these windows has its own entries. When I enter values into the entries and I use the method tkraise() to highlight another window, the values are deleted.

Does anyone know what I can do to keep the values in the entries, even if I change between the windows?

Do I have to save the values first with entryXYZ.get() and set the values in the entries again, if the user switch between the windows(Frames)?
def subframe_AGap(self):                          
        self.jobNameA_text = tk.StringVar()
        self.jobNameA_entry = tk.Entry(self.sub_AGapCanvas, textvariable = self.jobNameA_text)
        self.jobNameA_entry.place(x=130, y=120, width = 210)
        self.jobNameA_entry.configure({"background": "light green"})


self.A_GapFrame.tkraise()
self.subframe_AGap()
self.A_GapFrame.grid(row=2, column=0, sticky='news') 
When i put some text in self.jobNameA_text and after that I order to switch to an other Frame B_GapFrame.tkraise() all my values in subframe_AGap() are deleted. Have someone another idea to solve this?
Reply


Messages In This Thread
Tkinter delete values in Entries, when I'm changing the Frame - by robertoCarlos - Jul-29-2020, 02:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 820 Jan-16-2024, 06:44 PM
Last Post: rob101
  [Tkinter] Help running a loop inside a tkinter frame Konstantin23 3 1,450 Aug-10-2023, 11:41 AM
Last Post: Konstantin23
  tkinter mapview in a frame janeik 2 1,245 Jun-22-2023, 02:53 PM
Last Post: deanhystad
  [Tkinter] Trouble changing Font within tkinter frame title AnotherSam 1 4,009 Sep-30-2021, 05:57 PM
Last Post: menator01
  tkinter frame camera opencv Nick_tkinter 9 5,323 Mar-21-2021, 06:41 PM
Last Post: Nick_tkinter
  [Tkinter] changing the frame colour nick123 4 16,425 Jul-24-2020, 07:32 AM
Last Post: LegacyCoding
  Why is wx.NO_BORDER changing panels within a frame MeghansUncle2 4 2,506 Jul-12-2020, 12:32 PM
Last Post: Yoriz
  [Tkinter] tkinter, dropdowns with changing options Sheepykins 4 9,702 Jul-03-2020, 06:06 AM
Last Post: jdos
  changing tkinter label from thread nanok66 3 7,215 Jun-07-2020, 01:37 AM
Last Post: nanok66
  How to disable focus on Frame in Tkinter? szafranji 1 2,973 May-13-2020, 10:45 PM
Last Post: DT2000

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020