![]() | Programming Guide | WideStudio Index Table of contents |
The pull-down menu and the menu area
What is the menu area
The menu area: WSCmenuArea is a form, which secures an area for the pull-down menus. This class keeps constant area in 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 pull-down menu
Now try to create a sample application which has pull-down menu.The sample has [File] menu such as picture and the [File] menu has these items as follows.
[A sample application which has pull-down menu]
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)] selected. You can set event procedures which title is open_ep with NONE trigger to the pull-down 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 pull-down menu
It is not allowed to use WSCpulldownMenu class and other WSCvXXXX classes on a same form. Place instances of WSCpulldownMenu class only in the menu area.
Copyright(C) WideStudio Development Team, 1999-2005 | Last modified: Jan 05, 2005 |