I am trying to remove statattext from the list and I get an error: AttributeError: 'tuple' object Not attribute 'deleted' I can not seem to find a way around it. My code: import wx square orange (wx.frame): def __init __ (self, guardian, id): wx.frame .__ init __ (self, guardian, id, 'test ', Size = (300,300) self.frame = wx.Panel (self) subtract = wx.Button (self.frame, label =' - ', pos = (80,200), size = (30,30)) self. Bind (wx .EVT_BUTTON, self.sub, subtract) self.trying = [] self.Something = 0 def sub (self, event): for zip (self.trying): i.Destroy () self.something + = 1 self .trying.append (wx.StaticText (self.frame, -1, str (self.something), pos = (200,200)) self.trying.append (wx.StaticText (self.frame, -1, str) (Self). (Some), pos = (250,200)) if __name__ == '__ main__': app = wx.PySimpleApp () window = orange (parent = none, id = -1) and Show () app.MainLoop () I am really confused why the static text is in a tuple, thanks ...
Comments
Post a Comment