ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Menu functions
  • Characteristics of the cloned element
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
MenuClone (Function)
In french: MenuClone
Clones a menu or a menu option as well as the associated code.
Creates a new menu or a new menu option. This new menu (or menu option) is a copy of an existing menu. The new menu or the new menu option is necessarily created in the same menu as the source element.
Example
// Clone a menu option
MenuClone("MNU_Schedule", "MNU_Schedule2008", "Schedule 2008")
Syntax

Inserting a cloned menu or a cloned option at the specified position Hide the details

<Result> = MenuClone(<Source element> , <Cloned element> , <Text of cloned element> [, <Insertion position>])
<Result>: Integer
Position of the cloned menu or position of the cloned menu option. A fatal error occurs if the cloning is not performed.
<Source element>: Menu name or option name
Name of the menu or menu option to copy.
<Cloned element>: Character string
Name of the cloned menu or menu option. This name will be used to handle the cloned element through programming.
<Text of cloned element>: Character string
Caption of the cloned menu or menu option. This caption will allow the user to handle the element.
<Insertion position>: Optional integer or Integer constant
Position where the cloned menu or the cloned option will be inserted. This parameter can correspond to:
  • an integer: in this case, the cloned menu or the cloned menu option will be inserted before the specified position.
  • one of the following constants:
    menuInsertBeforeSeparator
    (Default value)
    Adds the cloned element before the next separator.
    menuInsertEndAdds the cloned element at the end of the menu

Inserting a cloned menu or cloned option at the relative position Hide the details

<Result> = MenuClone(<Source element> , <Cloned element> , <Text of cloned element> [, <Insertion element>])
<Result>: Integer
Position of the cloned menu or position of the cloned menu option. A fatal error occurs if the cloning is not performed.
<Source element>: Menu name or option name
Name of the menu or menu option to copy.
<Cloned element>: Character string
Name of the cloned menu or menu option. This name will be used to handle the element through programming. A fatal error occurs if this name corresponds to an existing element.
<Text of cloned element>: Character string
Caption of the cloned menu or menu option. This caption will allow the user to handle the element.
<Insertion element>: Optional character string
Name of the element before which the cloned element must be inserted. If this name is not specified, the cloned element will be inserted before the next menu separator.
Remarks

Characteristics of the cloned element

The cloned element shares the initial parameters with the source element:
  • its code
  • its shortcuts
The cloned element does not share with the source element:
  • the parameters modified after its creation
  • its name
  • The cloned menu option or the cloned menu will be automatically made visible.
Component: wd290obj.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help