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
#2
What you describe is not normal behavior, so all you have to do is find the bug in you code.

To get much help you really have to wrap you python code inside python tags.
Quote:[python]
code goes here
[/python]
There is a little python button in the toolbar for doing this.

Without proper formatting it is hard to read your code. Without all the relevant code it is hard to find your error. My guess is you are deleting entries by creating new entries. If there is no reference to an Entry it gets gobbled up by garbage collection. All Python objects have a reference count. The count is essentially how many variables are mapped to the object.
When the count drops to zero the object is deleted and memory is returned to the heap to be reused. Each time you call obj.subframe_AGap(), obj.jobNameA_entry gets pointed at a new Entry. That means it no longer points to the existing entry. If obj.jobNameA_entry was the only variable mapped to the Entry the reference count drops to zero and the Entry object gets deleted.

Though what I say is correct it may not be what is causing your problem. If you could create a small working example that demonstrates the problem I'm sure someone will give you a better answer.
Reply


Messages In This Thread
RE: Tkinter delete values in Entries, when I'm changing the Frame - by deanhystad - Jul-29-2020, 03:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 1,031 Jan-16-2024, 06:44 PM
Last Post: rob101
  [Tkinter] Help running a loop inside a tkinter frame Konstantin23 3 1,607 Aug-10-2023, 11:41 AM
Last Post: Konstantin23
  tkinter mapview in a frame janeik 2 1,349 Jun-22-2023, 02:53 PM
Last Post: deanhystad
  [Tkinter] Trouble changing Font within tkinter frame title AnotherSam 1 4,156 Sep-30-2021, 05:57 PM
Last Post: menator01
  tkinter frame camera opencv Nick_tkinter 9 5,485 Mar-21-2021, 06:41 PM
Last Post: Nick_tkinter
  [Tkinter] changing the frame colour nick123 4 16,655 Jul-24-2020, 07:32 AM
Last Post: LegacyCoding
  Why is wx.NO_BORDER changing panels within a frame MeghansUncle2 4 2,573 Jul-12-2020, 12:32 PM
Last Post: Yoriz
  [Tkinter] tkinter, dropdowns with changing options Sheepykins 4 9,855 Jul-03-2020, 06:06 AM
Last Post: jdos
  changing tkinter label from thread nanok66 3 7,402 Jun-07-2020, 01:37 AM
Last Post: nanok66
  How to disable focus on Frame in Tkinter? szafranji 1 3,040 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