Home | Sign in | English US
  • Use conditions
  • Use example
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Cancels the last action performed by the end user when modifying the interface ("Edit by the end user" mode enabled). This function is equivalent to an "Undo" (CTRL + Z) performed by the user.
This function is mainly used when creating an editor by programming (see the "Notes").
// [Cancel] button
WinEdUndo(<Window Name>)
<Window Name>: Character string (with or without quotes)
Name of window or internal window to use. This window must be in modification mode (WinEdActive).

Use conditions

  • WinEdUndo has no effect if there is no action to cancel.
  • If the last action is a custom action run by WinEdDo, the procedure defined by WinEdDeclareUndo is run.
  • The canceled action can be restored:
    • by pressing CTRL + Y,
    • by programming with WinEdRedo.

Use example

WinEdDo is used to create custom actions (control creation for example) that support the undo/redo.
Let's take a simple example: creating an editor of graphic objects. A button is used to create a shape. The user must have the ability to cancel the creation of the shape. The following operations are performed:
  • Switching the window to modification mode (WinEdActive).
  • Call to WinEdDo. The procedure called by this function is used to create the shape. This procedure also contains the call to WinEdDeclareUndo. WinEdDeclareUndo is used to define the behavior in case of user cancelation.
  • Switching the window to normal mode (WinEdActive).
The end user can cancel this action (CTRL + Z or call to WinEdUndo) then eventually redo it (CTRL + Y or call to WinEdRedo).
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, ...
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 21
This page is also available for…
Click [Add] to post a comment