485
edits
(Created page with '==== Question ==== Each DEO control has its own popup menu. In the old days (when FormFloatingPopupMenu was used), we could add our own items to the default menu. How can we do ...') |
m (add syntax highlighting) |
||
Line 16: | Line 16: | ||
For example, you could add your custom menu in the middle as follows: | For example, you could add your custom menu in the middle as follows: | ||
<source lang="dataflex"> | |||
Use Windows.pkg | Use Windows.pkg | ||
Use cCJStandardMenuItemClasses.pkg | Use cCJStandardMenuItemClasses.pkg | ||
Line 86: | Line 87: | ||
End_Object | End_Object | ||
</source> | |||
If you've built your own menu you can do a similar thing inside of Popup. You can do whatever you want before you forward Popup (like create new items) and you can do whatever you want after you forward Popup (like remove some items). It's actually a lot easier than regular menus. I thought this was documented somewhere, but I can't find it. | If you've built your own menu you can do a similar thing inside of Popup. You can do whatever you want before you forward Popup (like create new items) and you can do whatever you want after you forward Popup (like remove some items). It's actually a lot easier than regular menus. I thought this was documented somewhere, but I can't find it. | ||
Line 91: | Line 93: | ||
And, finally, if you really just want to change an existing context menu, it's actually pretty easy. It's a lot easier than creating dynamic menus because the objects are not activated so all you have to do is to add the objects. You can do something like this: | And, finally, if you really just want to change an existing context menu, it's actually pretty easy. It's a lot easier than creating dynamic menus because the objects are not activated so all you have to do is to add the objects. You can do something like this: | ||
<source lang="dataflex"> | |||
Class cMenuTest is a cCJMenuItem | Class cMenuTest is a cCJMenuItem | ||
Procedure Construct_Object | Procedure Construct_Object | ||
Line 113: | Line 116: | ||
Send DoAddItemsToContextMenu | Send DoAddItemsToContextMenu | ||
</source> | |||
==== External Links ==== | ==== External Links ==== | ||
[http://support.dataaccess.com/Forums/showthread.php?44753-How-to-add-your-own-items-to-the-default-cCJContextMenu How to add your own items to the default cCJContextMenu] | [http://support.dataaccess.com/Forums/showthread.php?44753-How-to-add-your-own-items-to-the-default-cCJContextMenu How to add your own items to the default cCJContextMenu] | ||
[[Category: CodeJock]] |