ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Project editor / Environment
  • Overview
  • How to?
  • Adding an option to the CustomMenu
  • Deleting an option from the CustomMenu
  • Remark
  • Examples
  • Creating an option to run an executable
  • Creating a menu option with macros
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The CustomMenu allows you to create a custom menu in the menu bar of WINDEV, WEBDEV and WINDEV Mobile. This feature allows you to add shortcuts to your favorite applications (calculator, ...), to open different files (charter, ...).
The CustomMenu is also available from the Project dashboard, via the "CustomMenu" widget.
How to?

Adding an option to the CustomMenu

To add an option to the CustomMenu:
  1. Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. The CustomMenu configuration window appears.
  3. Click "Add".
  4. Enter a menu caption.
  5. Enter the command lines that will be run when this option is selected. You can type:
    • the executable path: type the path in the control or use the "Browse..." button.
    • macros: click the "Macro" button and double-click the macro that will be added to your command line. For example, "Name of Current Project" {$ProjectName} will be replaced with the name of your project currently edited.
      The main macros are as follows:
      • {$ProjectName}: Name of current project.
      • {$ProjectDir}: Current project directory.
      • {$FullProjectPath}: Full path of current project.
      • {$ExeName}: Name of executable generated from the current project.
      • {$ConfigName}: Name of current configuration for the current project.
      For a complete list of available macros, all you have to do is click the "Macro" button.
  6. Select the runtime options of the command line:
    • Display the console: a console (command prompt) will be displayed.
    • Leave the console opened: if a console is displayed, it will remain opened until the end of execution of the program.
    • Non-locking execution: the execution of the command line will not lock the access to WINDEV, WEBDEV or WINDEV Mobile.
  7. Select the runtime directory of program.
  8. Enter:
    • the message displayed in the status bar when the option is hovered by the mouse cursor.
    • the icon displayed in front of the option in the CustomMenu.
Remark: A folder or a separator can be added to a CustomMenu. A folder is used to create a sub-menu.

Deleting an option from the CustomMenu

To delete an option from the CustomMenu:
  1. Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. The window for configuring the CustomMenu is displayed.
  3. Select the menu option to delete.
  4. Click the "Delete" button.

Remark

An option of a CustomMenu can be run before or after the generation of a project configuration.
Examples

Creating an option to run an executable

This paragraph describes the operations that must be performed to create a menu option used to run an executable (the Windows calculator in this case):
  1. Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. In the window for configuring the CustomMenu, click the "Add an option" button.
  3. Type the caption: "Calculator".
  4. Click the "Browse..." button and select the "CALC.exe" file (found in the System32 directory of Windows for example).
  5. Type "Start the calculator" in the "Message" control and select the "CALC.exe" file again in the "Icon" control.
  6. Validate.
You now have the ability to open as many calculators as you want from the different editors.

Creating a menu option with macros

This paragraph explains how to create a menu option by using macros. In this example, the macros will be used to open the <ProjectName>.rtf file. This file is automatically created for any new project and it contains general information about the project.
  1. Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. In the window for configuring the CustomMenu, click the "Add an option" button.
  3. Type the caption: "Project information".
  4. Click the "Macro" button and select the "{$ProjectDir}" macro.
  5. In the command line, type the "\" character after "{$ProjectDir}".
  6. Click the "Macro" button again and select the "{$ProjectDir}" macro.
  7. In the command line, type the ".rtf" characters after "{$ProjectDir}" .
  8. Type "Information about the project" in the "Message" control.
  9. Validate.
You can now open the ".rtf" file specific to each project.
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/27/2022

Send a report | Local help