[wxPython] Menu when right-clicking on Windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Menu when right-clicking on Windows

Pieter Claerhout-3
Hello,

how do I attach a menu to a wxHtmlWindow control, so that when you
right click on it, you can see this menu??

Kind regards,


Pieter

Pieter Claerhout - [hidden email]
Response Center - Applications Support

Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium
Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Menu when right-clicking on Windows

Robin Dunn
>
> how do I attach a menu to a wxHtmlWindow control, so that when you
> right click on it, you can see this menu??
>

You should be able to do it just like for any other window, catch
EVT_RIGHT_UP and in the handler create a menu and use PopupMenu to show it.
You can see an example in wxPython/demo/wxListCtrl.py

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users