TMenu class
TMenu - a menu appearing in a form. Base class for
TMainMenu or
TPopupMenu.Declaration
TMenu = class(TLCLComponent)Inheritance
Descends from it: TMainMenu TPopupMenu
Description
TMenu is the base class for all menus.
The class definition contains very few public or published properties or methods accessible to the application programmer, but contains the entry Items which points to the Menu Items that appear in the menu displays.
See also
Properties
Handle | public | Handle for the menu allocated in the widgetset class. |
Parent | public | Parent component for the menu. |
ShortcutHandled | public | Indicates whether the shortcut key for a menu item is used in the menu. |
AutoLineReduction | published | Indicates the method used to perform line reduction for the menu and optionally for its child Items. |
BidiMode | published | Indicates whether Bi-directional text mode is implemented allowing use with languages like Arabic or Hebrew. |
ParentBidiMode | published | The BiDiMode value for the parent component. |
Items | published | Contains the menu items displayed on the menu. |
Images | published | The image list with bitmaps used as glyphs for the menu items. |
ImagesWidth | published | Width for the bitmaps in the Images property. |
OwnerDraw | published | Indicates if the menu items are drawn using the OnDrawItem event handler. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
BidiModeChanged | protected | Performs actions needed when the value in BiDiMode has been changed. |
CreateHandle | protected | Creates the Handle for the menu. |
DoChange | protected | Performs actions needed when the specified menu item has been changed. |
GetHandle | protected | Gets the value for the Handle property. |
GetChildren | protected | Calls the specified process for the Items in the menu control. |
MenuChanged | protected | Implements the OnChange event handler assigned to menu items in the menu. |
AssignTo | protected | Copies property values from the class instance to the specified persistent object. |
Notification | protected | Handles a notification when a component is added to or removed from the control. |
ParentBidiModeChanged | protected | Performs action when ParentBiDiMode has been changed. |
SetChildOrder | protected | Sets the order for the menu item specified in Child. |
UpdateItems | protected | UpdateItems has an empty implementation in the current LCL version. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
DestroyHandle | public | Frees the Handles for the items on the menu. |
FindItem | public | Gets the menu item with the specified value in a given property. |
GetHelpContext | public | Gets the numeric help context for the menu item with the specified handle or command. |
IsShortcut | public | Indicates if the specified control message contains a shortcut (accelerator) key used in the menu. |
HandleAllocated | public | Returns True if a Handle has been allocated for the menu. |
IsRightToLeft | public | Indicates if Right-to-Left text display is used in the menu. |
UseRightToLeftAlignment | public | UseRightToLeftAlignment - returns True if Right-to-Left alignment is being used. |
UseRightToLeftReading | public | Indicates if right-to-left reading is used for the menu. |
HandleNeeded | public | Ensures that a Handle has been allocated for the menu. |
DispatchCommand | public | Executes the menu item with the specified numeric Command value. |
Events
OnChange | protected | Event handler signalled when a menu item in Items has been changed. |
OnDrawItem | published | Event handler signalled to draw a menu item on the menu. |
OnMeasureItem | published | Event handler signalled to get the width and height for a menu item on the menu. |
Fields
FCompStyle | public | Stores component style flags. |
Inherited
From TLCLComponent (7)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance RemoveAllHandlersOfObject WidgetSetClass
From TComponent (71)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
Assign FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (36)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
