right click on menu item?

Is it possible to bind a right click event on a wxMenu item in a popup menu? I am using a popup menu to select shortcuts, but would like the user to be able to remove items via selecting with a right click.

Thanks,

Che

Hi Che,

···

On 5 November 2011 07:07, C M wrote:

Is it possible to bind a right click event on a wxMenu item in a popup menu? I am using a popup menu to select shortcuts, but would like the user to be able to remove items via selecting with a right click.

I don’t think you can with the standard wx.Menu (but I may be wrong, please do correct me if this is the case). However, FlatMenu has this functionality, although as you know it is not a native menu on any platform.

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/

Hi Andrea. That’s a good idea, and I’d be willing to use FlatMenu, but for some reason it is not working in the Demo that I have (wxPython 2.8.10.1, Python 2.5, WinXP). It gives this error in the Demo’s log window:

Received Flat menu update UI event ID: 20001
Received Flat menu update UI event ID: 20002
Received Flat menu update UI event ID: 20003
Received Flat menu update UI event ID: 20004
Debug: …..\src\msw\dc.cpp(2338): ‘BitBlt’ failed with error 0x00000057 (the parameter is incorrect.).

…and then there is window damage to the frame that provides the button to launch the FlatMenu, and when you push the buttons themselves, the space where the menu would be is at first gray and then on a second push it is black.

I just checked out from SVN the flatmenu.py code and it didn’t help. Please advise.

Thanks,
Che

···

On Sat, Nov 5, 2011 at 3:48 AM, Andrea Gavana andrea.gavana@gmail.com wrote:

Hi Che,

On 5 November 2011 07:07, C M wrote:

Is it possible to bind a right click event on a wxMenu item in a popup menu? I am using a popup menu to select shortcuts, but would like the user to be able to remove items via selecting with a right click.

I don’t think you can with the standard wx.Menu (but I may be wrong, please do correct me if this is the case). However, FlatMenu has this functionality, although as you know it is not a native menu on any platform.

Hi Che,

···

On 6 November 2011 21:46, C M wrote:

On Sat, Nov 5, 2011 at 3:48 AM, Andrea Gavana andrea.gavana@gmail.com wrote:

Hi Che,

On 5 November 2011 07:07, C M wrote:

Is it possible to bind a right click event on a wxMenu item in a popup menu? I am using a popup menu to select shortcuts, but would like the user to be able to remove items via selecting with a right click.

I don’t think you can with the standard wx.Menu (but I may be wrong, please do correct me if this is the case). However, FlatMenu has this functionality, although as you know it is not a native menu on any platform.

Hi Andrea. That’s a good idea, and I’d be willing to use FlatMenu, but for some reason it is not working in the Demo that I have (wxPython 2.8.10.1, Python 2.5, WinXP). It gives this error in the Demo’s log window:

Received Flat menu update UI event ID: 20001
Received Flat menu update UI event ID: 20002
Received Flat menu update UI event ID: 20003
Received Flat menu update UI event ID: 20004
Debug: …..\src\msw\dc.cpp(2338): ‘BitBlt’ failed with error 0x00000057 (the parameter is incorrect.).

…and then there is window damage to the frame that provides the button to launch the FlatMenu, and when you push the buttons themselves, the space where the menu would be is at first gray and then on a second push it is black.

I just checked out from SVN the flatmenu.py code and it didn’t help. Please advise.

I am not sure what the problem is. I currently don’t have 2.8.10 anymore but I can see FlatMenu is working on 2.8.12 and 2.9.2.4 on Windows Vista and 7. Did you update also the FlatMenu demo from SVN?

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/

I am not sure what the problem is. I currently don’t have 2.8.10 anymore but I can see FlatMenu is working on 2.8.12 and 2.9.2.4 on Windows Vista and 7. Did you update also the FlatMenu demo from SVN?

Hi Andrea. I hadn’t, but I just did and re-tested: same problem. I could try upgrading wxPython and the Demo to 2.8.12 in a few days, but not sure I can go to 2.9 just yet because I’m not sure Boa can follow me there. I’m on WinXP, if it helps to know.

(Werner, do you happen to know if Boa can?)

Thanks,
Che