PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Principle
  • Customize the interface
  • Implementation and configuration
  • Implementation
  • Setting for the project and windows
  • Available options
  • Programming and advanced features
  • Overview
  • Configuring the options for GUI modification by programming
  • WLanguage functions for managing the GUI modification
  • How to find out the type of modification performed by the user?
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
Overview
From version 21, the WINDEV applications allow the end user to modify the interface of his application.
The end user can decide whether some elements are found in his application, he can modify and adapt the windows to his own use.
Today, everybody customizes his smartphone screen, why not do the same with your applications?
Principle
When the interface is modification is enabled for the end user, several new options appear at run time for the end user:
  • Customize the interface (option found in the popup menu of the window): Allows the end user to customize the interface of the window (see below).
  • Repositionable notes (option found in the popup menu of the window): Allows the end user to add repositionable notes in the window.
    See Repositionable note (AAF) for more details.
For some types of controls, an option found in the popup menu is used to modify the control tooltip ("Edit the tooltip" option).
Notes:
  • The menu options appear only if the AAF menu is enabled on the window.
    Reminder: To enable the AAF menu:
    • Open the "GUI" tab of the window description.
    • Expand the option "Popup Menu" and check "Display the menu of AAF (System)".
  • During the test of a window or project ( and ), the options for modifying the interface are also available. If these options are used, WINDEV automatically proposes, at the end of test, to include the modifications performed in the current window. See Using the GUI modification when running a project or window test for more details.

Customize the interface

If the option "Customize the interface" is selected, you have the ability to switch to modification mode ("Switch to modification mode" sub-option).
In this mode, the user can perform all operations allowed by the developer:
  • Select one or more controls,
  • Move one or more controls,
  • Create a wire between several controls,
  • Edit the tooltip of controls.
You also have the ability to manage the current modifications:
  • Import a customization: Imports a customization that was exported beforehand (*.wdmodif file).
  • Export the customization of this window: Exports the customization of current window via a file in ".wdmodif" format.
  • Export all customizations of application: Exports the customization of application via a file in ".wdmodif" format.
  • Restore the initial configuration: Restores the initial configuration implemented by the developer.
Note: The "*.wdmodif" export file can be directly opened in the WINDEV editor. In this case, the editor proposes to apply the modifications saved in the corresponding windows to the current project.
Implementation and configuration

Implementation

By default, all the WINDEV applications created or compiled with version 21 (and later) allow the GUI to be modified by the end user.
These options can be configured:
  • in the project. The options will be taken into account for all the project windows.
    To configure the modification of interface by the end user:
    1. Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
    2. In the "Advanced" tab, check "Modification of GUI by the end user".
    3. The "Options" button is used to specify the authorized options.
  • for each window. The options will be taken into account for the selected window only.
    1. Display the window description of window ("Description" from the popup menu of window).
    2. In the "Details" tab, check "Modification of GUI by the end user".
    3. The "Options" button is used to specify the authorized options.
Note: By default, the setting of windows corresponds to the project setting.

Setting for the project and windows

The options for configuring the GUI are as follows:
  • No modification. Automatically unchecks the option "Modification of GUI by the end user". The end user cannot modify the interface of his application.
    Notes:
    • The repositionable notes can no longer be used by the end user.
    • The options for modifying the interface are no longer available when running the executable. These options are still available in GO mode.
  • By default. Displays and gives the ability to use the default options. The "Show" button is used to display the default options. These options cannot be modified.
  • Specific setting: Used to define the options for the project or for the window. If a specific setting is performed for the project, these options are automatically applied to the windows.

Available options

The available options for modifying the GUI are as follows:
  • Options regarding the controls:
    • Selection: The user can select a control.
    • Multiselection: The user can select several controls via the Ctrl key or via the mouse.
    • Move: The end user can move the controls in the window.
    • Resizing: The end user can resize the controls found in the window.
    • Make visible/invisible: The user can make the controls visible or invisible (this option is not available in this version).
    • Modify the tooltip: The end user can modify the control tooltip.
      Note: A new option "Edit the tooltip" is available. This option can be available in the popup menu of the control or when switching the window to modification mode.
  • Options regarding the Wire control:
    • Add a wire: The end user can create a Wire control between two controls.
    • Modify the links of a wire: The end user can modify the links of a Wire control with two controls.
  • Options regarding the repositionable notes (see Repositionable note (AAF) for more details).
    • Add a repositionable note: The end user will have the ability to add a repositionable note in the application windows (or in the current window). The window will contain the option "Repositionable notes .. Create a repositionable note".
    • Modify the text: The end user will have the ability to modify the text of the repositionable note.
    • Collapsed or expanded: The end user will have the ability to collapse or expand the repositionable note.
    • Automatic collapsed: The end user will have the ability to use the "Automatic collapsed" mode: the repositionable note will be automatically collapsed after 5 seconds.
Programming and advanced features

Overview

Several WLanguage properties and functions can be used to implement and manage the modification of GUI by the end user.
These functions allow you to describe an editor in WLanguage, with support for undo/redo.

Configuring the options for GUI modification by programming

To configure the options for GUI modification by programming:
  1. Use ..WinEditMode to configure the actions allowed on the window and its controls when the window switches to the mode "Modification of GUI by the end user".
  2. Use ..WinEditAllowed to configure the actions allowed on a control when the window switches to the mode "Modification of GUI by the end user".
Note: To disable the ability to configure the window GUI, use AAFDisable associated with the aafCustomizeUI constant. In this case, the popup menu "Customize the interface" will not be available anymore.

WLanguage functions for managing the GUI modification

These functions can be grouped by theme:
  • Functions for activation and backup:
    Versions 21 and later
    WinEdActive
    New in version 21
    WinEdActive
    WinEdActive
    Used to:
    • find out whether the "Edit by the end user" mode is enabled in a window (or in an internal window).
    • enable (or not) the "Edit by the end user" mode in a window (or in an internal window.
    Versions 21 and later
    WinEdLoad
    New in version 21
    WinEdLoad
    WinEdLoad
    Loads the modifications performed by the end user in a window.
    Versions 21 and later
    WinEdRestore
    New in version 21
    WinEdRestore
    WinEdRestore
    Cancels all the modifications made by the end user (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdSave
    New in version 21
    WinEdSave
    WinEdSave
    Saves the modifications made in the mode "Modification of GUI by the end user".
    Versions 21 and later
    WinEdSaveNote
    New in version 21
    WinEdSaveNote
    WinEdSaveNote
    Exports the repositionable notes created by the user into a file.
  • Functions for managing the selection of controls:
    Versions 21 and later
    WinEdDeselectAll
    New in version 21
    WinEdDeselectAll
    WinEdDeselectAll
    Deselects all the controls when the interface is modified by the end user (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdSelect
    New in version 21
    WinEdSelect
    WinEdSelect
    Returns on of the controls selected when the interface is modified by the end user (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdSelectMinus
    New in version 21
    WinEdSelectMinus
    WinEdSelectMinus
    Deselects a control when the interface is modified by the end user (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdSelectOccurrence
    New in version 21
    WinEdSelectOccurrence
    WinEdSelectOccurrence
    Indicates the number of controls selected when the interface is modified by the end user (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdSelectPlus
    New in version 21
    WinEdSelectPlus
    WinEdSelectPlus
    Selects a control when the interface is modified by the end user (Mode "Modification of GUI by the end user" enabled).
  • Functions for Undo/Redo management:
    Versions 21 and later
    WinEdDeclareUndo
    New in version 21
    WinEdDeclareUndo
    WinEdDeclareUndo
    Declares how to cancel an action that was added by WinEdDo.
    Versions 21 and later
    WinEdDo
    New in version 21
    WinEdDo
    WinEdDo
    Runs an action (defined by programming) with support for Undo/Redo.
    Versions 21 and later
    WinEdRedo
    New in version 21
    WinEdRedo
    WinEdRedo
    Runs the last action canceled by the end user when modifying the interface (Mode "Modification of GUI by the end user" enabled).
    Versions 21 and later
    WinEdUndo
    New in version 21
    WinEdUndo
    WinEdUndo
    Cancels the last action performed by the end user when modifying the interface (Mode "Modification of GUI by the end user" enabled).

How to find out the type of modification performed by the user?

A specific event is run when the user performs an interface modification (select, move or resize).
To find out the type of modification, simply associate an event to the un interface modification. This operation can also be performed by ..Process and by the following constants:
trtWinEdChangeSizeEvent run when resizing controls.
trtWinEdMoveEvent run when moving controls.
trtWinEdSelectionEvent run when selecting controls.

Note: In the procedure called by ..Process, you also have the ability to perform a specific process according to the modifications performed by the user.
Related Examples:
WD Graphic Objects Training (WINDEV): WD Graphic Objects
[ + ] This educational example illustrates the power of WLanguage regarding object-oriented programming.
This example is an editor of graphic objects.

You have the ability to:
- move, resize the objects
- perform selections with the lasso or with the mouse
- cut/copy/paste objects
- delete/duplicate objects
- save the created documents and print them.

The main technical features presented and documented in this example are as follows:
- managing a clipboard of objects
- managing UNDO/REDO
- serializing and deserializing objects
- algorithms for managing graphic objects (proportional resize operations, management of movement rules, etc.)
WD Interactive Application Training (WINDEV): WD Interactive Application
[ + ] This example explains how to use the WinEdXXX functions in an interactive application.
This application is used to mange a connected house (switch the lights on, find out the temperature).

The WinEdXXX functions are used to move the controls on the house map, while proposing advanced features such as the backup of modifications, the cancelation, ...
Minimum version required
  • Version 21
Comments
Click [Add] to post a comment