ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Windows functions that can be handled by the end user
  • Overview
  • Principle
  • Customize interface
  • Implementation and configuration
  • Implementation
  • Setting for the project and windows
  • Available options
  • Programming and advanced features
  • Overview
  • Configuring the options for UI modification through programming
  • WLanguage functions for managing UI 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
By default, WINDEV applications allow end users to modify the interface of the application.
End users can decide whether some elements should be in the application, they can modify and adapt the windows to their own use.
Today, everybody customizes their smartphone screen, why not do the same with their applications?
Principle
When end-user modification of the interface is enabled, several new options appear at runtime:
  • Customize the interface (option in the context menu of the window): Allows the end user to customize the interface of the window (see below).
  • Repositionable notes (option in the context menu of the window): Allows the end user to add repositionable notes in the window.
    For more details, see Repositionable note (AAF).
For some types of controls, an option in the context menu is used to modify the control tooltip ("Edit the tooltip" option).
Remarks:
  • The menu options appear only if the AAF menu is enabled on the window.
    Reminder: To enable the AAF menu:
    • Open the "UI" tab of the window description.
    • Expand the "Context menu" option and check "Display the AAF menu (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. For more details, see Using the GUI modification when running a project or window test.

Customize interface

If the option "Customize interface" is selected, you have the ability to switch to modification mode ("Change to edit 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.
Remark: 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 WINDEV applications created or compiled from version 21 allow end users to modify the UI.
These options can be configured:
  • in the project. The options will be taken into account for all the project windows.
    To configure the end-user UI modification:
    1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
    2. In the "Advanced" tab, check "Allow end users to modify the UI".
    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. Open the window description ("Description" from the window context menu).
    2. In the "Details" tab, check "Allow end users to modify the UI".
    3. The "Options" button is used to specify the authorized options.
Remark: By default, the setting of windows corresponds to the project setting.

Setting for the project and windows

The options for configuring the UI are as follows:
  • No modification. Automatically unchecks the option "Allow end users to modify the UI". End users will not be able to modify the interface of the application.
    Remarks:
    • 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 settings: 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 UI are as follows:
  • Options regarding the controls:
    • Select: The user can select a control.
    • Multi-selection: 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.
    • Resize: 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).
    • Edit tooltip: The end user can modify the control tooltip.
      Remark: The new "Edit tooltip" option is available. This option can be available in the context 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.
    • Edit links of a wire: The end user can modify the links of a Wire control with two controls.
  • Options regarding the repositionable notes (for more details, see Repositionable note (AAF)).
    • 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".
    • Edit text: The end user will have the ability to modify the text of the repositionable note.
    • Collapse or expand: The end user will have the ability to collapse or expand the repositionable note.
    • Collapse automatically: The end user will have the ability to use the "Collapse automatically" 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 UI by the end user.
These functions allow you to describe an editor in WLanguage, with support for undo/redo.

Configuring the options for UI modification through programming

To configure the options for UI modification through programming:
  1. Use WinEditMode to configure the actions allowed on a window and its controls when the window switches to "Allow end users to modify the UI" mode.
  2. Use WinEditAllowed to configure the actions allowed on a control when the window switches to "Allow end users to modify the UI" mode
Remark: To prevent window UI modifications, use AAFDisable with the aafCustomizeUI constant. In this case, the context menu "Customize interface" will no longer be available.

WLanguage functions for managing UI modification

These functions can be grouped by theme:
  • Functions for activation and backup:
    WinEdActiveUsed to:
    • determine if the "Allow end users to modify the UI" option is enabled in a window (or internal window).
    • enable or disable the "Allow end users to modify the UI" option in a window (or internal window).
    WinEdLoadLoads the changes made by the end user in a window.
    WinEdRestoreUndoes all the changes made by the end user ("Allow end users to modify the UI" option enabled).
    WinEdSaveSaves the changes made when the "Modification of UI by the end user" mode is enabled.
    WinEdSaveNoteExports the repositionable notes created by the user into a file.
  • Functions for managing selection of controls:
    WinEdDeselectAllDeselects all the controls when the interface is modified by the end user ("Allow end users to modify the UI" option enabled).
    WinEdSelectReturns one of the controls selected when the interface is modified by the end user ("Allow end users to modify the UI" option enabled).
    WinEdSelectMinusDeselects a control when the interface is modified by the end user ("Allow end users to modify the UI" option enabled).
    WinEdSelectOccurrenceIndicates the number of controls selected when the interface is modified by the end user ("Allow end users to modify the UI" option enabled).
    WinEdSelectPlusSelects a control when the interface is modified by the end user ("Allow end users to modify the UI" option enabled).
  • Functions for Undo/Redo management:
    WinEdDeclareUndoDeclares how to cancel an action that was added by WinEdDo.
    WinEdDoRuns an action (defined programmatically) and enables Undo/Redo operations on this action.
    WinEdRedoRuns the last action undone by the end user ("Allow end users to modify the UI" option enabled).
    WinEdUndoUndoes the last action performed by the end user when modifying the interface ("Allow end users to modify the UI" option 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.

Remark: 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 example illustrates the power of WLanguage in object oriented programming.
This example is a graphic object editor.

It is possible to:
- move, resize objects
- make selections with a lasso or a mouse
- cut/copy/paste objects
- delete/duplicate objects
- save the created documents and print them.

The main technical features presented and documented are:
- management of an object clipboard
- UNDO/REDO management
- serialization and deserialization of objects
- algorithms for managing graphic objects (proportional resizing, management of move 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

Last update: 06/26/2023

Send a report | Local help