shellproperties MenuOptions property
Return to Introduction  Previous page  Next page
Applies to
dcShellProperties component.  

Declaration
type  
  TdcContextMenuOption = (moCanRename, moAllowDelete, moAllowCut, moAllowCopy, moAllowPaste, moAllowCreateShortcut, moActionItems, moExtendedItems, moSystemItems);  
  TdcContextMenuOptions = set of TdcContextMenuOption;  
 
property MenuOptions: TdcContextMenuOptions;  

Description
The MenuOptions property controls the behavior of the context popup menu for the shell objects.  
 
These are the possible values:  
ValueMeaning  
moCanRenameshows "Rename" menu item in the context menu. Set moCanRename flag to True if you would like to allow ranaming of the shell object. tip The shell object could not be renamed automatically. You must write OnRename event handler to perform this operation;  
moAllowDeleteallows to delete shell objects (move to trash can), when True. To disallow deleting - set moAllowDelete flag to False;  
moAllowCutallows to cut shell objects to clipboard, when True. To disallow cutting - set moAllowCut flag to False;  
moAllowCopyallows to copy shell objects to clipboard, when True. To disallow copying - set moAllowCopy flag to False;  
moAllowPasteallows to paste shell objects from clipboard, when True. To disallow pasting - set moAllowPaste flag to False;  
moAllowCreateShortcutallows to create shortucts for shell objects, when True. To disallow creation of the shortcuts - set moAllowCreateShortcut flag to False;  
 
Also, you can show or hide some groups of the context menu:  
ValueMeaning  
moActionItemsshows or hides the "Action" menu items. These menu items identifies some default actions for the shell object, like "Open", "Print" or "Explore". If you would like to show only "action" items - set moExtendedItems and moSystemItems to False;  
moExtendedItemsshows or hides the "extended" verbs of the system menu. These menu items is the shell extensions for some shell objects. If you'd like to show only "extended" and "action" items - set moSystemItems to False;  
moSystemItemsshows or hides the "system" menu items. These menu items represents system operations for the shell object. Operations like "Cut", "Copy", "Paste", "Delete", "Rename" (if moCanRename is True), "Properties" and so forth... If you would like to show only "system" items - set moActionItems and moExtendedItems to False;  

Example
with dcShellProperties1 do  
  MenuOptions := MenuOptions - [moExtendedItems];  

See also
ShowContextMenu, ShowContextMenuByFile methods;  
OnDelete, OnRename events.