|
Total Access Components Tour: Popup MenuThe Popup Menu control provides a way to display a Windows-style context or popup menu when a user right clicks on a control or form.
Using the Popup Menu controlThere are four basic steps for using the Popup Menu control: Step 1 - Determine which controls need a popup menuPlan which functionality and menu choices are available when the user right clicks on the control. Step 2 - Modify the Popup Menu control’s propertiesOpen the Popup Menu control’s property sheet by right-clicking on the control, selecting FMS Popup Menu Control 2002 Object, and choosing Properties. Menu items are created by referencing each item number. Each menu choice is displayed using its ItemText property, and can be checked, enabled/disabled, or can act as a separator. Step 3 - Write code to display the popup menuThe typical way to handle this is to trap the clicking of the right mouse button. In this case, the code (to call the Popup Menu control’s Show method) is put in the form or control’s MouseDown or MouseUp event and is run if the mouse button pressed is the right button (Button = 2). Step 4 - Write code to handle the menu choice selectedIn the Popup Menu control’s OnSelect event, set up a way to handle each menu choice, usually by using a select case block. Popup Menu Properties
Popup Menu Methods
Popup Menu Events
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Contact Us
l Web questions: Webmaster
l Copyright
© 2008 FMS, Inc. Celebrating 22 Years of Software Excellence |