Creating context menus (Functions/Subroutines/Programs)

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:

charset_utf-8

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.

  • kb/kb_articles/kb0036.txt
  • Last modified: 2024/01/30 13:36
  • by 127.0.0.1