I am hoping somebody can identify the error in my ways here :).
I'll try!
I want to add the ability to right click on a button in a the
agw.buttonpanel.ButtonPanel. To do so, I've got something like this:
My first thought is to go into the agw source and add it there, but...
class MyButtonPanel(buttonpanel.ButtonPanel):
def __init__(self,parent,id=-1,title=''):buttonpanel.ButtonPanel.__init__(self, parent, id, title,
agwStyle=buttonpanel.BP_USE_GRADIENT, alignment=buttonpanel.BP_ALIGN_TOP)
self.Bind(wx.EVT_RIGHT_DOWN,self.OnRightDown)
If you want to catch an event on a button, bind it to the buttons, not
the panel itself. somethign like:
for button in self._vButtons:
button.Bind(wx.EVT_RIGHT_DOWN, the_method_to_call)
-Chris
···
On Mon, Jul 15, 2013 at 5:02 AM, srbshawker <srbshawker@gmail.com> wrote:
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov