03-29-2005 02:06 AM
03-29-2005 07:25 AM
03-29-2005 07:16 PM
03-04-2011 03:52 PM
I have a program with 3 different tables and wanted to make my own menu for the right click menu. When doing so, my menu appears first. And then after click elsewehere or a function, the default one appears with the Goto, Find, Sort items. I obviously do not want these so my question is how to resolve this?
Do I need to use the function HideBuiltInCtrlMenuItem to every single table for each of those three? It seems if I hide all three of those items, the menu does not appear at all which solves my issue. Is this the correct way to do this? Otherwise adding items to the built in list would work, but have no idea how to do that, or if it's possible.
Thanks
03-07-2011 04:39 AM - edited 03-07-2011 04:41 AM
It seems strange to me that the built-ion popup menu appears after your own menu is displayed: how are you displaying your popup menu? If you are using RunPopupMenu to handle the right-click event and display your menu it is possible that it fires the built-in menu also.
If you don't need the built-in popup menu you do not need to remove every single item from it: you can use SetCtrlAttribute (panelHandle, PANEL_TABLE, ATTR_ENABLE_POPUP_MENU, 0); instead.
In every case, this is a control attribute: you must isse this line for every single table you want to customize: SetAttributeForCtrls ( ) from the Programmer'sToolbox is very useful in this matter.
As already mentioned in this thread, to add items to the built-in menu you can use NewCtrlMenuItem ()