Sign in Join
FPDoc Onlineexperiment

TMenu class

In unit Menus

TMenu - a menu appearing in a form. Base class for TMainMenu or TPopupMenu.

Declaration

pascal
TMenu = class(TLCLComponent)

Inheritance

  1. TMenu
  2. TLCLComponent
  3. TComponent
  4. TPersistent
  5. TObject

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

HandlepublicHandle for the menu allocated in the widgetset class.
ParentpublicParent component for the menu.
ShortcutHandledpublicIndicates whether the shortcut key for a menu item is used in the menu.
AutoLineReductionpublishedIndicates the method used to perform line reduction for the menu and optionally for its child Items.
BidiModepublishedIndicates whether Bi-directional text mode is implemented allowing use with languages like Arabic or Hebrew.
ParentBidiModepublishedThe BiDiMode value for the parent component.
ItemspublishedContains the menu items displayed on the menu.
ImagespublishedThe image list with bitmaps used as glyphs for the menu items.
ImagesWidthpublishedWidth for the bitmaps in the Images property.
OwnerDrawpublishedIndicates if the menu items are drawn using the OnDrawItem event handler.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
BidiModeChangedprotectedPerforms actions needed when the value in BiDiMode has been changed.
CreateHandleprotectedCreates the Handle for the menu.
DoChangeprotectedPerforms actions needed when the specified menu item has been changed.
GetHandleprotectedGets the value for the Handle property.
GetChildrenprotectedCalls the specified process for the Items in the menu control.
MenuChangedprotectedImplements the OnChange event handler assigned to menu items in the menu.
AssignToprotectedCopies property values from the class instance to the specified persistent object.
NotificationprotectedHandles a notification when a component is added to or removed from the control.
ParentBidiModeChangedprotectedPerforms action when ParentBiDiMode has been changed.
SetChildOrderprotectedSets the order for the menu item specified in Child.
UpdateItemsprotectedUpdateItems has an empty implementation in the current LCL version.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
DestroyHandlepublicFrees the Handles for the items on the menu.
FindItempublicGets the menu item with the specified value in a given property.
GetHelpContextpublicGets the numeric help context for the menu item with the specified handle or command.
IsShortcutpublicIndicates if the specified control message contains a shortcut (accelerator) key used in the menu.
HandleAllocatedpublicReturns True if a Handle has been allocated for the menu.
IsRightToLeftpublicIndicates if Right-to-Left text display is used in the menu.
UseRightToLeftAlignmentpublicUseRightToLeftAlignment - returns True if Right-to-Left alignment is being used.
UseRightToLeftReadingpublicIndicates if right-to-left reading is used for the menu.
HandleNeededpublicEnsures that a Handle has been allocated for the menu.
DispatchCommandpublicExecutes the menu item with the specified numeric Command value.

Events

OnChangeprotectedEvent handler signalled when a menu item in Items has been changed.
OnDrawItempublishedEvent handler signalled to draw a menu item on the menu.
OnMeasureItempublishedEvent handler signalled to get the width and height for a menu item on the menu.

Fields

FCompStylepublicStores 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.