MMCC MASTHEAD


CONTENTS

v1.10
Mid-Michigan Computer Consultants, Inc.
509 Center
Bay City, Michigan

Sales (989) 892-9242             Support (989) 686-8860

Visual PL/B Language

PL/B MENU OBJECTS

Here are a few quick notes on MENU objects.
  • Menus can be created on the main window or on a window created by the form designer.
    MY_MENU      MENU
    MY_MENU_DATA INIT  ")MYSTUFF":
                       ";)Scream":
                       ";Sho)ut"
    				   
            CREATE     MY_MENU,MY_MENU_DATA
            ACTIVATE   MY_MENU,MY_MENU_ROUTINE,MENU_RESULT
    		
            CREATE     Form_Window;MY_MENU,MY_MENU_DATA
            ACTIVATE   MY_MENU,MY_MENU_ROUTINE,MENU_RESULT
    	
  • A number of special characters can be used in the menu definition. Such as function keys, etc.
    WATCH OUT FOR: the < symbol which is a special SUFFIX. This causes the runtime to use the built in fuctions for the numbered functions rather than passing the event to your own routine.

    The benefit of this is so that the standard RIGHT CLICK offers CUT, COPY, PASTE, etc. You might want to have these also show up on your EDIT menu... but you don't want to process them yourself. By including the <n suffix to your menu item, the standard CUT/COPY processing will be done by the runtime. If you DO NOT use the <n suffix, and the menu item is clicked, control passes to you and you must handle it.

    The < codes from the plb manual are:
                      <1  Undo
                      <2  Cut
                      <3  Copy
                      <4  Paste
                      <5  Delete
                      <6  Select All
    


  • The examples in the on-line help from Sunbelt show things like the illustration below. That's a very good example. What's not spelled out is that the hex 09 (0x09) tab character in the string is exactly that... a tab character. It's only used to line things up in the menu item on the screen.
                MENUDATA    INIT      ")Demo;":
                                      "/T&Test",0x09,"CTRL+T;":
                                      "<F5&Next Item",0x09,"F5;":
                                      "&Previous Item",0x09,"SHIFT+F5<sF5"
                .		
                            CREATE    XMENU,MENUDATA
    
    

CONTENTS

v1.10
Send e-mail to MMCC.

Write to MMCC Technical Support at:
MMCC, Inc.
600 W. Midland
Bay City, MI 48708
(989) 686-8860
| Home   |

© 1997 MMCC, Inc. All Rights Reserved.

Report problems or suggestions to support@mmcctech.com
Site hosted by Molarnet Technologies
Since 09/15/1998