TPopupMenu class
Implements a menu panel that pops up on the screen when the right mouse button is clicked.
Declaration
TPopupMenu = class(TMenu)Inheritance
Description
TPopupMenu is a menu panel that pops up on the screen when the
right mouse button is clicked.
TPopupMenu inherits all the properties of TMenu (including the
properties of TMenuItem), but has some new methods (procedure
PopUp and procedure Close) that define its behavior
when invoked.
PopupPoint defines the position of the pop-up menu, usually at the current cursor position.
To use a pop-up menu, first create it with the MenuEditor. Then with the Object Inspector for the control that needs to use the Pop-up, select the property named PopupMenu, and a list box will appear with the names of the available Menus - choose the Pop-up name you want.
TPopupMenu for the Windows platform was modified in LCL version 2.2.6. It no longer uses the highlighted drawing effect when drawing the glyph icon for an enabled menu item. The normal drawing effect is used instead.
See also
Properties
PopupComponent | public | Component to which the pop-up menu is attached. |
PopupPoint | public | TPoint instance with the coordinates where the pop-up menu is displayed. |
Alignment | published | Determines the position of pop-up menu relative to the pop-up coordinate. |
AutoPopup | published | Indicates if the pop-up is displayed when the mouse hovers over the component for the pop-up menu. |
HelpContext | published | Help context for the pop-up menu. |
TrackButton | published | Identifies the mouse button which activated the pop-up menu. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
DoPopup | protected | Performs actions needed to display the pop-up menu. |
DoClose | protected | Performs actions needed when the pop-up menu is closed. |
SetPopupPoint | protected | Sets the value for the PopupPoint property. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
PopUp | public | Displays the pop-up menu. |
Close | public | Closes the pop-up menu when it is active. |
Events
OnPopup | published | Event handler signalled to display the pop-up menu. |
OnClose | published | Event handler signalled when the pop-up menu is closed. |
Inherited
From TMenu (34)
AssignTo AutoLineReduction BidiMode BidiModeChanged CreateHandle DestroyHandle DispatchCommand DoChange FindItem GetChildren GetHandle GetHelpContext Handle HandleAllocated HandleNeeded Images ImagesWidth IsRightToLeft IsShortcut Items MenuChanged Notification OnChange OnDrawItem OnMeasureItem OwnerDraw Parent ParentBidiMode ParentBidiModeChanged SetChildOrder ShortcutHandled UpdateItems UseRightToLeftAlignment UseRightToLeftReading
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.
