I'm using wxpython.
I'd like to solve a simple problem for a GUI that consists of a button "Add", which when pressed creates a new button called "Remove". You can press "Add" as many times as you like and many remove buttons are created and added to the panel. What I would like is for when you press one of the remove buttons, that remove button itself is removed from the panel.
The problem is when you bind a function to a button with this:
self.Bind(wx.EVT_BUTTON, self.remove_function, button_name)
you can't pass an argument to the function telling it which button to remove. (Or can you?)