Wide Studio Programmer's Guide

Wide Studio Home
Up to


The pulldown menu and the menu area



What is the menu area

The menu area: WSCmenuArea is a form which secures an area for the pulldown menus. This class keeps constant area the upper part. And its geometry is automatically adjusted when the parent window is resized.



[A sample which has a menu area(WSCmenuArea)]



Try to use the pulldown menu

Now try to create a sample application which has pulldown menu.



[A sample application which has pulldown menu]

The sample has [File] menu such as picture and the [File] menu has these items as follows.
  • Open
  • Save
  • Exit
  • At first, create an application window and drop an instance of WSCmenuArea from the section [Forms] of object box dialog. Next, drop an instance of WSCpulldownMenu from the section [Commands] to it. Set the property as follows.
  • Label string: File
  • Menu items: Open(O):open_ep:o,Save(S):save_ep:s,SP,Exit(E):exit_ep:e
  • To the menu items property,set value which is punctuated with comma every one item.
    One item consists of the following format. It indicates a separator with an item: SP.
      item string:event procedure name:short cut key,...
    

    For example, in an above-mentioned example, an event procedure which title is open_ep is executed when the menu [Open(0)] selectede. You can set event procedures which title is open_ep with NONE trigger to the pulldown menu instance.
    You can assign ID to each menu item, and you can process the all triggers of each menu with an event procedure to use the ID.
    In the case with ID, one item consists of the following format. In the procedure,you can get the ID with getValue() method.
      item string:event procedure name:short cut key:id,...
    


    Notice of the pulldown menu

    It is no allowed that useing WSCpulldownMenu class and other WSCvXXXX class on a same form. Place instances of WSCpulldownMenu class only on a menu area.
    Document Release 1.3

    For Use with Wide Studio Release 1.3, Summer 2001


    Wide Stuido Home | Up to

    Copyright(C) T. Hirabayashi, 2000-2001 Last modified: August 20, 2001