Problem with event context menu

Hi all !

(Sorry for my english : im french)

When i click with the right button mouse on my frame B : this one
displays the CONTEXT MENU i have done for the parent frame A, which is
above the frame B. Amazing no ?

Notes :

That works normally when I use :
     frameA = MyFrameA(parent=NONE)
instead of :
     frameA = MyFrameA(parent=SELF)

But i need to let self as the parent argument. So would you have a
solution for me.

Thx for yours answers (and i hope you understood what i wrote !)

Hi,

Hi all !

(Sorry for my english : im french)

When i click with the right button mouse on my frame B : this one
displays the CONTEXT MENU i have done for the parent frame A, which is
above the frame B. Amazing no ?

Notes :

That works normally when I use :
frameA = MyFrameA(parent=NONE)
instead of :
frameA = MyFrameA(parent=SELF)

But i need to let self as the parent argument. So would you have a
solution for me.

Thx for yours answers (and i hope you understood what i wrote !)

I think we'll need a sample application to know what's wrong. See
http://wiki.wxpython.org/MakingSampleApps

If you are binding the context menu to the frame properly, this
shouldn't happen. This is just a guess, but since it sounds like you
are passing one frame into another as the second frame's parent, that
is probably why you are seeing this behavior.

- Mike

···

On May 29, 2:59 am, clshlan <webmaster.clshlanni...@wanadoo.fr> wrote:

Mike Driscoll wrote:

Hi,

Hi all !

(Sorry for my english : im french)

When i click with the right button mouse on my frame B : this one
displays the CONTEXT MENU i have done for the parent frame A, which is
above the frame B. Amazing no ?

Notes :

That works normally when I use :
     frameA = MyFrameA(parent=NONE)
instead of :
     frameA = MyFrameA(parent=SELF)

But i need to let self as the parent argument. So would you have a
solution for me.

Thx for yours answers (and i hope you understood what i wrote !)

I think we'll need a sample application to know what's wrong. See
http://wiki.wxpython.org/MakingSampleApps

If you are binding the context menu to the frame properly, this
shouldn't happen. This is just a guess, but since it sounds like you
are passing one frame into another as the second frame's parent, that
is probably why you are seeing this behavior.

To stop command events from propagating past the child frame up to the parent frame you need to set a style flag on the child frame, like this:

         self.SetExtraStyle(wx.WS_EX_BLOCK_EVENTS)

···

On May 29, 2:59 am, clshlan <webmaster.clshlanni...@wanadoo.fr> wrote:

--
Robin Dunn
Software Craftsman