There is no separate item on the palette for this object. This is created when editing a TMainMenu or TPopupMenu and are the actual menu line items.
PROPERTIES
The following are the properties that apply to this object. Some are defined in Common Properties and are linked to their appropriate page.
Appearance
Caption | This is the text that is displayed as the line item of the menu. This is any standard string and can be changed at runtime. |
NOTE: If you put a single hyphen (-) as the caption, when the menu is displayed a complete line will be displayed. This will allow you to separate the actual items that can be selected into groups.
Behavior
Default | If this is checked (set to .True.) the menu item will be the default object on the menu. This means if the user presses the ENTER key it will have the same effect as if they had clicked the item. |
Hint
Misc
Other
Bitmap | You can specify an image that is to be part of the menu line item. It will be displayed on the left side of the line. |
Break | You can force the menu to start another column with this property. The options are: mbNone (do not start another column - this is the default value), mbBarBreak (start a new column and put a vertical bar between the current and new column), mbBreak (start a new column and put a space between the current and new column). |
Checked | If this is checked (set to .True.) a check mark will be put at the left side of the menu item. If you have also check the RadioItem property then instead of a check mark a radio mark (the same used in the TTASRadioButton) will be used. The default value is not checked (set to .False.). |
ImageIndex | If you have specified a TImageList in the parent item of this one then this is the number of the image in that list. The default value is -1. Images start at 0. |
NOTE: For each menu item level a TImageList is specified. It may be the same image list for all levels, but it need not be.
RadioItem | If this is checked (set to .True.) a radio mark (the same used in the TTASRadioButton) will be put at the left side of the menu item if the Checked property above is also set. The default value is not checked (set to .False.). |
ShortCut | This is the keys the user can press that would be the equivalent of clicking on the menu item. The default value is (none) which means there are no short cut keys. |
SubMenuImages | If you are going to create sub menus, that is line items that use this item as a 'parent' and, you want to use images from a TImageList object in those subsequent line items, you need to put that image list object name here. This is the same type of property as Images in TMainMenu or TPopupMenu. |
EVENTS
This object has a single event that is called if your user clicks the menu item. This event looks to your program for a special label. It is made up of the object Name, a period (.) and the Event name (Click). The full event name would be ObjectName.Click:. You would not return a value from the program, just a simple RET is all that is required. So, the user clicks the menu item, if the event label exists the routine is called, you return from the routine, and the user has control again.
NOTE: You can have multiple menu items call the same routine by 'stacking' the event labels on top of each other. For example, if you had two menu items you wanted to call the same event, you could do the following:
mliFirst.click:
mliSecond.click:
//event routine code would go here.
ret
The labels are not part of the code executed. They are just place keepers and tell the program where to go.
Page url: http://www.cassoftware.com/tas/manual/tmenuitem.htm