PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Vocabulary associated with the main menus
  • How to create, edit and delete a main menu?
  • Creating a main menu
  • Editing a main menu
  • Deleting a main menu
  • ? menu
  • Handling a main menu by programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A main menu is necessarily associated with a window. This menu is displayed below the title bar of the window. In most cases, the applications contain a menu window. This window only contains a main menu and it is used to access the other application windows.
For example:
=Main menu of a Windows application
WINDEV Mobile WINDEV Mobile allows you to create standard menus for all available platforms.
  • AndroidiPhone/iPadUniversal Windows 10 App The menus are automatically included in the Action Bar. See Action Bar of a window for more details.
  • Windows Mobile In Windows Mobile, the menus created with WINDEV Mobile automatically adapt to the selected runtime platform.
    Pocket PCSmartphone
    Menu in PocketMenu in Smartphone
    The menu options can be easily selected with the stylus of Pocket PC.The menu options are automatically numbered: numbers are added in front of the caption of each sub-option. These numbers are used to access the sub-options by pressing the Smartphone keys.
    The menu options can also be accessed by the "joystick" of Smartphone.
    Note: In an application for Smartphone, only two menus can be displayed at the same time. These menus can be accessed via the buttons found below the Smartphone screen.
Android In Android
Universal Windows 10 App In Windows Phone
Android menu
Windows Phone menu
The menu options contain an image and a caption. Several cases may occur:
  • If the menu contains less than 6 options, it is displayed like large buttons at the bottom of the screen.
  • If the menu contains more than 6 options, the first 5 options are displayed like large buttons and a sixth automatic button ("Plus") allows the user to see the rest of the menu like a drop-down menu.
Note: The menus of the Android applications support a single level of sub-menus. Beyond this limit, a fatal error occurs when running the application.
The menu options contain an image and a caption. Only the image is displayed at run time. The "..." button is used to display (or not) the caption of options. Several cases may occur:
  • If the menu includes less than 4 options, it is displayed like small buttons at the bottom of the screen.
  • If the menu includes more than 4 options, the first 4 options are displayed like small buttons and the "..." button is used to display the caption of options as well as the additional options.
Note: The menus of the Windows Phone applications cannot have any sub-menus. A fatal error occurs when running the application.
Vocabulary associated with the main menus
To easily handle a main menu, you must be familiar with the following vocabulary:
=Vocabulary associated with the menus
How to create, edit and delete a main menu?

Creating a main menu

To create a main menu:
  1. In the window editor, open the window where a main menu must be added.
  2. Select "Windows .. Main menu .. Add the main menu". The first menu option is displayed in the menu bar. By default, the name of main menu is "_Menu" and the caption of this first option is "Menu".On the "Window" pane, in the "Bars and menus" group, expand "Main menu" and select "Add the main menu". The first menu option is displayed in the menu bar. By default, the name of main menu is "_Menu" and the caption of this first option is "Menu".AndroidiPhone/iPadUniversal Windows 10 App The menu is automatically created in the Action Bar control.
  3. To modify the name of main menu:
    • WINDEV display the "General" tab of window description ("Description" from the popup menu of the window) and type the new name for the main menu in the "Name of main menu" option.
    • WINDEV Mobile display the "Style" tab of window description ("Description" from the popup menu of window) and type the new name for the main menu in the "Name of main menu" option.
  4. Add the menu options into the window in edit. See Handling the menu options for more details.
Tip: To add images into the menu options, use the image catalog ("Catalog" button). The selected images will be automatically adapted to the size and to the image format expected by the runtime platform used. Tip: To add images into the menu options, use the image catalog ("Catalog" option of Drop-down button button). The selected images will be automatically adapted to the size and to the image format expected by the runtime platform used.
WINDEVWindows Note: Menu in the clipped windows: You have the ability to specify the position of the main menu in order to adapt it to the window. To position the menu:
  1. Display the window description ("Description" from the popup menu of window).
  2. In the "General" tab, enter the X and Y coordinates of the menu.

Editing a main menu

To edit a main menu:
  1. Open a window containing a main menu in the window editor.
  2. Select one of the menu options. The options and the sub-options are automatically displayed.

Deleting a main menu

To delete a main menu:
  1. In the window editor, open the window from which the main menu must be deleted.
  2. Select "Windows .. Main menu .. Delete the main menu". All the menu options and the code associated with this main menu are deleted.On the "Window" pane, in the "Bars and menus" group, expand "Main menu" and select "Delete the main menu". All the menu options and the code associated with this main menu are deleted.
WINDEVWindows

? menu

WINDEV allows you to automatically insert a "?" menu at the end of the main menu.
See ? menu for more details.
Handling a main menu by programming
A main menu cannot be directly handled by programming. However, the options of a main menu can be handled by programming. See Handling the menu options by programming for more details.
Related Examples:
WD Animated Menu Training (WINDEV): WD Animated Menu
[ + ] The "WD Animated Menu" example proposes several menu animations, based on the interface of the full example named "WD Managing Orders".
These animations allow the main menu to be more attractive and dynamic when opening the window:
- appearance of the menu buttons with a fade-in effect,
- movement of the buttons
- etc.
WD Pure Menu Training (WINDEV): WD Pure Menu
[ + ] The "WD Pure Menu" example proposes a menu that can be customized via a control template.
Each option is represented by an image and a button (that can be entirely configured) that scroll from bottom to top (and from top to bottom).
Several parameters can be defined:
- Image of the button in selection/outside selection,
- Font of the caption in selection/outside selection,
- Procedure to run when selecting an option or when clicking an option.
WD OSD Training (WINDEV): WD OSD
[ + ] OSD means: On-Screen Display. This is the name given to the interfaces that appear on the computer screens or on the TV screens for example. They are used to perform settings in most cases.
These types of menus are displayed above all the other elements found on the screen.
This example explains how to create this type of interface in WINDEV.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment