Adding a widget with a button - wxPython
问题 I'm trying to create something like the categories panel in Wordpress, with wxPython. What I'm trying to figure out, is how to add a widget when the user clicks a button (like "Add New Category") Here is my code: import wx class MainWindow(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(300,200)) self.panel = wx.Panel(self, -1) button = wx.Button(self.panel,-1,"Button") self.vbox = wx.BoxSizer(wx.VERTICAL) self.vbox.Add(button) add_btn = wx