Quick Find: Search for:

 Total Access Components
Control Tour

Return to Components Home
 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

About Box

AVI (Video)

Bitmap Effects

Border
Browse for Folder New!
CD Player
Clipboard
Clock
Common Dialogs
Date Time Picker New!
Digital Display
Enhanced Button
Gauge
Icon Menu
INI File
Marquee
Notes
Popup Menu
Progress Meter
Registry
Resize
Slider
Spin Button
Splitter
System Info
Tab Strip
Text Effects
Timer
Wave
 

 

Total Access Components Tour: Popup Menu

The 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 control

There are four basic steps for using the Popup Menu control:

Step 1 - Determine which controls need a popup menu

Plan which functionality and menu choices are available when the user right clicks on the control.

Step 2 - Modify the Popup Menu control’s properties

Open 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 menu

The 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 selected

In 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

Name

Description

ItemCount

The number of menu items.

ItemChecked

The checked property of the specified item.

ItemEnabled

The enabled property of the specified item.

ItemSeparator

The separator property of the specified item.

ItemText

The text of the specified menu item.

Popup Menu Methods

Name

Description

Show Displays the popup menu.

Popup Menu Events

Name

Description

OnSelect Fires when a menu item is selected.

 

Contact Us  l   Web questions: Webmaster   l   Copyright © 2008 FMS, Inc.

Celebrating 22 Years of Software Excellence