|
|
|
|
|
- Use conditions
- Use example
WinEdUndo (Function) In french: FenEdUndo Undoes the last action performed by the end user when modifying the interface ("Allow end users to modify the UI" option enabled). This function is equivalent to an "Undo" (Ctrl + Z) performed by the user. This function is mainly used when creating an editor through programming (see "Remarks"). // [Cancel] button WinEdUndo(WIN_Form) Syntax <Window>: Window name Name of the window or internal window to be used. This window must be in edit mode (WinEdActive). Remarks 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 Ctrl + Y,
- programmatically with the WinEdRedo function.
Use example WinEdDo is used to create custom actions (control creation for example) that support the undo/redo feature. Let's take a simple example: creating a graphic object editor. A button is used to create a shape. The user must have the ability to undo the shape creation. The following operations are performed: - The window switches to edit mode (WinEdActive).
- Calling 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 cancellation.
- The window switches to standard mode (WinEdActive).
The end user can undo this action (Ctrl + Z or call to WinEdUndo) and eventually redo it (Ctrl + Y or call to WinEdRedo).
Related Examples:
|
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...)
|
|
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, ...
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|