Home | Sign in | English UK
  • 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
  • Handling a main menu by programming
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
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.
    Remark: 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.
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. On the "Window" pane, in the "Bars and menus" group, expand "Main menu" and select "Add 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 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" 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.

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. On the "Window" pane, in the "Bars and menus" group, expand "Main menu" and select "Delete main menu". All the menu options and the code associated with this main menu are deleted.
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.
[ + ] 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 version required
  • Version 9
This page is also available for…
Click [Add] to post a comment