Sign in Join
FPDoc Onlineexperiment

TPopupMenu class

In unit Menus

Implements a menu panel that pops up on the screen when the right mouse button is clicked.

Declaration

pascal
TPopupMenu = class(TMenu)

Inheritance

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

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

PopupComponentpublicComponent to which the pop-up menu is attached.
PopupPointpublicTPoint instance with the coordinates where the pop-up menu is displayed.
AlignmentpublishedDetermines the position of pop-up menu relative to the pop-up coordinate.
AutoPopuppublishedIndicates if the pop-up is displayed when the mouse hovers over the component for the pop-up menu.
HelpContextpublishedHelp context for the pop-up menu.
TrackButtonpublishedIdentifies the mouse button which activated the pop-up menu.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
DoPopupprotectedPerforms actions needed to display the pop-up menu.
DoCloseprotectedPerforms actions needed when the pop-up menu is closed.
SetPopupPointprotectedSets the value for the PopupPoint property.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
PopUppublicDisplays the pop-up menu.
ClosepublicCloses the pop-up menu when it is active.

Events

OnPopuppublishedEvent handler signalled to display the pop-up menu.
OnClosepublishedEvent 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.