How to enable action shortcut
Posted: Sun Feb 03, 2008 5:28 pm
I have an editor form that has no "main menu" itself - only buttons and popup menus. I've modified RVAPopupMenuHelper.PreparePopup(X, Y: Integer) as follows:
-----------------
AddAction(TrvActionCut);
AddAction(TrvActionCopy);
AddAction(TrvActionPaste);
AddAction(nil);
//------------My Mods
AddAction(TrvActionFontBold);
AddAction(TrvActionFontItalic);
AddAction(TrvActionFontUnderline);
AddAction(nil);
//-----------End My Mods
AddAction(TrvActionFontEx);
AddAction(TrvActionParagraph);
AddAction(TrvActionParaList);
-----------------
My problem is that the shortcuts associated with FontBold, FontItalic and Font Underline (Ctrl-B, Ctrl-I and Ctrl-U) do not work until I display the popup the first time. After that they work properly.
How can I get these shortcuts to work without having to first display the popup menu?
-----------------
AddAction(TrvActionCut);
AddAction(TrvActionCopy);
AddAction(TrvActionPaste);
AddAction(nil);
//------------My Mods
AddAction(TrvActionFontBold);
AddAction(TrvActionFontItalic);
AddAction(TrvActionFontUnderline);
AddAction(nil);
//-----------End My Mods
AddAction(TrvActionFontEx);
AddAction(TrvActionParagraph);
AddAction(TrvActionParaList);
-----------------
My problem is that the shortcuts associated with FontBold, FontItalic and Font Underline (Ctrl-B, Ctrl-I and Ctrl-U) do not work until I display the popup the first time. After that they work properly.
How can I get these shortcuts to work without having to first display the popup menu?