![]() |
| Support Home | Search | Documentation |
HOWTO: Right Click Pop-Up Menu in SubfileThe information in this article applies to:
SUMMARY:This article will discuss a way in which you can provide a user with a Right Click on a Subfile and have a Pop-Up Menu appear. NOTE: Figure 1 below shows how a pop-up menu appears on the users screen when the user right clicks.
Figure 1 MORE INFORMATION:NOTE: These methods listed below are examples. There might be other methods in which this feature can be incorporated into an AVR application that is not mentioned in this article. Requirements:
Program details:This example assumes a form has a subfile control named sbfCust and a two-element option button array named optMenu. These two option buttons determine which pop-menu will be displayed. It also assumes the AVR menu editor has been used to define three menus. One as the form's top-level menu and two pop-up menus. NOTE: Figure 2 below shows how these three menus look in the menu editor. Note the hierarchy the menu editor uses to show relationships amongst menus. In the example below, mnuMain is the form's top-level menu (the form's top level menu is always the first one displayed in the menu editor); puPopUpMenu1 and pupPopUpMenu2 are the two pop-up menus. Note how these two pop-up menus aren't included in mnuMain's hierarchy. puPopUpMenu1 and puPopUpMenu2 are both separate menus from mnuMain. Understanding how AVR uses menu hierarchy is the key to understanding and creating pop-up menus. Try using the menu editor's four arrow keys to change the hierarchy to see how it affects the menus displayed.
Figure 2 TIP: You don't have to the menu Visible to have this functionality. Here is the code that is needed for the right click event to be triggered:
To help understand the menu structure at work here, trying temporarily displaying the mnuMain menu as a pop-up:
Keywords: right click, example, client, develop, IDE, pop-up, menu, subfile, "popup menu" |
Last Modified Date: 2/22/2002 9:49:51 AM
Copyright © 2005, 2006 ASNA Inc.
| Support Home | Search | Documentation |