Navigation:  Reference > Form Objects >


Print this Topic Previous pageReturn to chapter overviewNext page


This object creates a menu that appears when the user right clicks on an object (you must specify the TPopupmenu object name as the PopupMenu property).  The items that make up the menu are actually TMenuItem objects.  You create those by using the Menu Item Editor.  The icon for this object is on the Standard page.


NOTE:  You can also display the menu by using the WMENU command.






The following are the properties that apply to this object.  Some are defined in Common Properties and are linked to their appropriate page.




AlignmentIn this case this property determines where the menu will appear in relation to the mouse.  The default is taLeftJustify (to the left of the mouse).




ItemsThese are the TMenuItems that make up the menu.  This is what the user will actually see.  To create new items or edit/delete existing ones you can either click on the button in the property field or, right click on the TMainMenu object and choose the Menu Designer option.


       NOTE:  At the current time you cannot add or remove menu items at runtime.  However, if you have extra items that you add during design you can turn them on or off (using the Visible option in the line item).










ImagesIf you want to include images in the menu you need to specify the TImageList here.  You will then choose individual images during menu design (creating the line items).


MenuAnimationThis property will control how the menu appears on the screen when the user right clicks the object in control.  The options are:  maBottomToTop (start at bottom and display to the top of the menu), maLeftToRight, maNone (the entire menu is displayed at once - this is the default value), maRightToLeft and maTopToBottom.



This object doesn't do anything by itself.  You have to create menu items with the menu editor before any items are visible.



There are no events for this object.


Page url: