Why does the following code create 2 widgets, and not overwrite each other? How would someone reference the first instance vs second instance?
import wx
app = wx.App(False)
frame = wx.Frame(None, -1, "Test", (250,250), (250,250))
panel = wx.Panel(frame, -1)
textbox = wx.TextCtrl(panel, -1, "", (10,10), (135,20))
textbox = wx.TextCtrl(panel, -1, "", (10,40), (135,20))
frame.Show()
app.MainLoop()
panelas parent, the first object is not deleted, but not accessible bytextboxname anymore. You have to callDestroy()method on the object first.