ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Window editor and page editor
  • Overview
  • Creating a preset control
  • Remarks
  • Reusing a Preset control
  • Sharing a Preset control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
My Preset controls
Overview
It is not uncommon for developers to recreate the same controls, with the same style and (almost) the same code in the same project, without using a template or an Internal Window control. The most common example is the "OK" and "Cancel" buttons.
Most developers tend to copy an existing control from another page or window, paste it and then edit it.
Preset controls make this whole process much simpler.
Warning
Starting with version 2025, "Favorite controls" are referred to as "My Preset controls".
Creating a preset control
To define a preset control:
  1. Create the control, customize its appearance and code if necessary.
  2. Right-click the control and select "Add to my Preset controls".
  3. In the window that appears, specify the characteristics of the preset control:
    • Title: Title of the Preset control. This title appears above the control preview in the "My Preset controls" list. It also appears as the title of the tooltip that appears when hovering over the Preset control.
    • Author: User who created the Preset control.
    • Description: Description of the preset control (purpose, etc.). This description appears in the tooltip that appears when hovering over the Preset control.
    • Related types of control: Type of control that will include the Preset control in its creation menu.
    • Categories: Categories for grouping Preset controls together. To create a new category, type its name and press Enter. To use an existing category, enter the first letter of the category.
    • Associated keywords: Keywords used to find a control in the list of Preset controls. To use an existing keyword, enter the first letter of the keyword.
    • WINDEV Indicate whether the skin template of the destination window should be applied when the control is dropped. In this case, the style of the control will match the skin template of the host window.
  4. Confirm.
The new Preset control will appear:
  • in the "My Preset controls" window .
  • in the list of options available for each type of control ("Creation" tab).

Remarks

  • You can also create a Preset control from a selection of controls.
  • Preset controls can only be used in the environment in which they were created.
  • A Preset control from a window cannot be used in a page (and vice versa).
  • A Preset control from a WINDEV window cannot be used in a WINDEV Mobile window (and vice versa).
  • Preset controls are linked to a project. However, they can be used in multiple projects. For more details, see Sharing a Preset control.
  • You can edit a Preset control directly from the list. Simply right-click the desired control in the list and select "Edit".
Reusing a Preset control
There are several ways to reuse a Preset control:
  • "My Preset controls" on the "Creation" tab:
    1. On the "Creation" tab, in the "Preset Smart" group, expand "My Preset controls".
    2. Search for the desired Preset control (by keyword or category).
    3. Select the desired control and drop it onto the current window or page.
    4. The control is created in the current page or window.
  • Preset controls associated with a type of control:
    1. On the "Creation" tab, expand the type of control you want to create.
    2. Any preset controls associated with the selected type of control will appear at the top of the list.
    3. Select the desired control and drop it onto the current window or page.
    4. The control is created in the current page or window.
Sharing a Preset control
The descriptions of preset controls are located in the "Preset" subdirectory of the project in which the control was created.
You can share preset controls using the Source Code Manager (SCM). Simply share the "Preset" directory, and the preset controls will be available in the different projects.
You can also copy preset controls from one project to another. Simply copy the "Preset" directory to the desired project.
Note: In the "Preset" directory, preset controls are classified into different folders according to the IDE in which they were created.
See also
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/05/2025

Send a report | Local help