Help on popup menu on wxTextCtrl

Hello,

I have to exchange items on the default pop-up menu of a wxTextCtrl in
order to get them localized (those items are always in english in my
Windows pt_BR box). I also need to insert some more items on that
menu. Which is the the wxPython way to do that?

Thanks in advance.

-- Tacao

E. A. Tacao wrote:

Hello,

I have to exchange items on the default pop-up menu of a wxTextCtrl in
order to get them localized (those items are always in english in my
Windows pt_BR box). I also need to insert some more items on that
menu. Which is the the wxPython way to do that?

The menu comes from the native control, so I would have expected it to be localized properly if your Windows box is setup to do so... In any case that menu can't be edited, but you can replace it with your own. Just catch the EVT_CONTEXT_MENU event and popup your own menu there.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

In Friday, October 17, 2003, 2:38:14 PM, Robin wrote:

The menu comes from the native control, so I would have expected
it to be localized properly if your Windows box is setup to do
so...

The menu items are localized if I create wxTextCtrl without wxTE_RICH2
style. If I use wxTE_RICH2, items appear in english. This also happens
in the Demo. I'm using Python 2.2.2, wxPython 2.4.1.2, Win XP Pro.

In any case that menu can't be edited, but you can replace it
with your own. Just catch the EVT_CONTEXT_MENU event and popup
your own menu there.

I'll do that. Thanks for the information.

Abração do Tacão

"He said the cosmos is a single sonic sound
that is vibrating constantly..."

(Judas Priest, in 'Sad Wings of Destiny' [Dreamer Deceiver])