From: Tyushkov Nikolay on
Hello

Is there a way to display a shortcut for menu item as usually but
disable its automatically handling?

Background: I have a tree and some other controls in my window. I have
added the following menu items

itemMenu->Append(ID_MoveUP, _("Move &Up\tCtrl+Up"), _T(""),
wxITEM_NORMAL);
itemMenu->Append(ID_MoveDown, _("Move &Down\tCtrl+Down"), _T(""),
wxITEM_NORMAL);

specified the Ctrl+Up\Down as shortcuts for this items.
I want that menu items always work, but keyboard shortcut should work
only if tree has focus, and should not work if any other control is active.
I see two ways to do this. A first way is disabling automatically
handling this shortcuts and processing them manually. A second one is
determination in event handler how we call this event from menu or from
keyboard, but I don't think that this is possible, am I correct?

I certainly can delete shortcut from menu, but I want user can see them,
don't like this.

How can I do this, if I can?

--
Best regards, Nikolay Tyushkov
http://softvoile.com - Work with texts faster!






_______________________________________________
wx-users mailing list
wx-users(a)lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wx-users