Creating context menus (Functions/Subroutines/Programs)
Created at 04 OCT 1996 04:38PM
To see the simplest of context menus, start by opening a Win95 Properties dialog box (such as System Properties). Click the ? (Help) button in the upper right corner of the dialog box, and then right-click any control in the dialog box. A menu pops up with one item: 'What's This?' Click 'What's This' to pop up basic information about the control.
The following code illustrates how you can create your own context menu in OpenInsight and make it as simple or complicated as you want.
To make this code work, you must create a new form in the Form Designer and place an OI control on the form – a push-button, a list-box etc. – anything your want. Our example uses an edit line named 'EL_1'. The code is in the form's OMNIEVENTevent procedure:
Enter the following settings for the form's quick events:
Event → CREATE
Control → @window
Message → OMNIEVENT
Param → 'CREATE'
and
Event → TIMER
Control → @window
Message → OMNIEVENT
Param → 'TIMER'
Now save everything, run the example and follow the instructions that appear.