Is there a way to disable the right-click options on a wxTextCtrl?
Not only do I not really want/need those options, it seems to cause an assert if you bring up the "Insert Unicode Control Character" sub-menu, but then click elsewhere (closing that sub-menu).
I would have expected some style setting for this, but I'm not seeing it in the documentation.
Disabling Right-Click option on wxTextCtrl?
-
- Experienced Solver
- Posts: 74
- Joined: Thu Sep 25, 2014 7:40 pm
Re: Disabling Right-Click option on wxTextCtrl?
That's a native function of the Windows text edit control. I don't know any way to disable it. You could try to catch the rightclick event and consume it (do nothing in the event handler). But i'm not sure if this works.Is there a way to disable the right-click options on a wxTextCtrl?
Do you see this in any of the wxWidgets samples (e.g. "widgets"?).Not only do I not really want/need those options, it seems to cause an assert if you bring up the "Insert Unicode Control Character" sub-menu, but then click elsewhere (closing that sub-menu).
Use the source, Luke!
-
- Experienced Solver
- Posts: 74
- Joined: Thu Sep 25, 2014 7:40 pm
Re: Disabling Right-Click option on wxTextCtrl?
Yes, I see this issue in both the "text" sample and the "widgets" sample.Do you see this in any of the wxWidgets samples (e.g. "widgets"?).
To reproduce:
1) Run the "widgets" sample in debug mode.
2) Right-click in the text control (the control labeled "Control Height").
3) Hover the mouse over the "Insert Unicode control character" option to bring up the sub menu.
4) Without selecting anything from that sub menu, left-click on some other window.
5) Assert is "..\..\src\msw\toplevel.cpp(1544): assert "m_menuDepth > 0" failed in wxTopLevelWindowMSW::DoSendMenuOpenCloseEvent(): No open menus?"
This is running on Win7-64, built using wxWidgets-3.0.2 and vc10.
Re: Disabling Right-Click option on wxTextCtrl?
I see this too in wx 3.0.2, but it seems to be fixed in current trunk version.5) Assert is "..\..\src\msw\toplevel.cpp(1544): assert "m_menuDepth > 0" failed in wxTopLevelWindowMSW::DoSendMenuOpenCloseEvent(): No open menus?"
Use the source, Luke!