PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Characteristics of the cloned element
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
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.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Example
// Clones 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(<Name of Source Element> , <Name of Cloned Element> , <Caption 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.
<Name of Source Element>: Character string (with or without quotes)
Name of the menu or menu option to copy.
<Name of Cloned Element>: Character string (with quotes)
Name of the cloned menu or menu option. This name will be used to handle the cloned element by programming.
<Caption of Cloned Element>: Character string (with quotes)
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 must 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:
    menuInsertEndAdds the cloned element at the end of the menu
    menuInsertBeforeSeparator
    (Default value)
    Adds the cloned element before the next separator.

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

<Result> = MenuClone(<Name of Source Element> , <Name of Cloned Element> , <Caption of Cloned Element> [, <Name of 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.
<Name of Source Element>: Character string (with or without quotes)
Name of the menu or menu option to copy.
<Name of Cloned Element>: Character string (with quotes)
Name of the cloned menu or menu option. This name will be used to handle the element by programming. A fatal error occurs if this name corresponds to an existing element.
<Caption of Cloned Element>: Character string (with quotes)
Caption of the cloned menu or menu option. This caption will allow the user to handle the element.
<Name of Insertion Element>: Optional character string (with or without quotes)
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.
Java You cannot clone a menu option created by programming.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment