Prepare event can be used to display context sensitive menus
Member of Base Menu (PRIM_MENU)
|Context||*Input||PRIM_OBJT||Reference to the control associated with the menu item being shown|
The Prepare event is fired whenever the popup is about to be shown. This provides an opportunity to configure the menu appearance at the time of showing rather than having to control it as the application is used.
In this example, menu items are enabled by calling an evaluation routine to determine whether the items are valid for the user.
Evtroutine Handling(#PopupMenu.Prepare) #NewCustomer.Enabled := #gApplication.CanDo(Create Customer #User) #OpenCustomer := := #gApplication.CanDo(Open Customer #User) #DeleteCustomer := := #gApplication.CanDo(Delete Customer #User) Endroutine
All Component Classes
Febuary 18 V14SP2