I'm trying to add popupmenu to a CollapsiblePane binding the pane to
the wx.EVT_CONTEXT_MENU event. But the popupmenu appears only in the
inside of the pane. When i click on the label, or the pane nothing
happens.
Is there a way to get it working on the label too?
Robin Dunn wrote:
Bind a handler for the EVT_CONTEXT_MENU even from those widgets too.
I looked into the sources of wxwidgets and there's a different
implementation for gtk and other platforms. Under gtk there's no way of
accessing those widgets. I tried it under windows, and everything work's
fine.
BTW. The gtk version and the msw version of the collapsiblepane looks
totally different. The windows version looks disgusting. I thought a
cross platform toolkit should look at least similar under different
platforms
I'm trying to add popupmenu to a CollapsiblePane binding the pane to
the wx.EVT_CONTEXT_MENU event. But the popupmenu appears only in the
inside of the pane. When i click on the label, or the pane nothing
happens.
Is there a way to get it working on the label too?
Robin Dunn wrote:
Bind a handler for the EVT_CONTEXT_MENU even from those widgets too.
I looked into the sources of wxwidgets and there's a different
implementation for gtk and other platforms.
Correct. wxGTK has a native widget, the others are implemented generically.
Under gtk there's no way of
accessing those widgets.
You may want to submit a bug report about the fact that the context menu event is not being generated in this case.
I tried it under windows, and everything work's
fine.
BTW. The gtk version and the msw version of the collapsiblepane looks
totally different. The windows version looks disgusting. I thought a
cross platform toolkit should look at least similar under different
platforms
Yeah, I don't like the generic implementation either.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!