Class: FloatingPopupMenu
Properties | Events | Methods | Index of Classes
Creates standard floating popup menus (context menus)
Hierarchy
cObject > cUIObject > DfBaseObject > DfBaseWindow > DfBaseUIWindow > DfBaseControl > DfBaseList > DfBaseActionBar > DfBasePullDown > DfBaseEditPullDown > FormFloatingPopupMenu > FloatingPopupMenu
Show full hierarchy and direct subclasses
Library: Windows Application Class Library
Package: Windows.pkg
Description
This class is obsolete. Menus are now created using class cCJMenuBar.
As of revision 12.1, DataFlex includes full support for Codejock Software's COM Xtreme CommandBars package for creating menus, toolbars and statusbars. See Using Menus, Toolbars and Statusbars for more information.
The FloatingPopupMenu class creates a menu that "floats" with the mouse cursor and pops up on a click of the secondary (usually right) button of the mouse. Objects of this class contain no items by default, all items must be provided by the developer.
The FormFloatingPopupMenu class contains some default items and additional items can be added to the existing items.
Sample
Object CustomMenu is a FloatingPopupMenu
Send Add_Item msg_Clear "&Clear"
Send Add_Item msg_Edit "&Edit"
Send Add_Item msg_None "" // create a spacer
Send Add_Item msg_Exit_Application "E&xit Application"
Procedure Popup
Integer iFocus iItem
Boolean bChanged
Get Focus to iFocus // the object that called us
Get Changed_State of iFocus to bChanged
// if changed, shadow exit option
Set Shadow_State 3 to bChanged
forward send Popup
End_Procedure
End_Object
Syntax
Use windows
:
Object oObjectName is a FloatingPopupMenu
Send Add_Item message MenuText
Set Aux_Value item item# to ObjectId // optional destination
:
Send Add_Item msg_None "" // separator
:
Procedure Popup
:
Set Shadow_State item# to True | False
:
Forward Send Popup
End_Procedure
End_Object