property Chart.UndoListAction ([Action as Variant], [Count as Variant]) as String
Lists the Undo actions that can be performed in the chart.

 TypeDescription 
   Action as Variant [optional] A long expression that specifies the action being listed. If missing or -1, all actions are listed. For instance, UndoListAction(2) shows only AddBar actions in the undo stack.  
   Count as Variant [optional] A long expression that indicates the number of actions being listed. If missing or -1, all actions are listed. For instance, UndoListAction(2,1) shows only the last AddBar action being added to the undo stack  
   String A String expression that lists the Undo actions that may be performed.  
Use the UndoListAction property to show the list of actions that the user may perform by doing Undo operations. The ChartStartChanging(exUndo/exRedo) / ChartEndChanging(exUndo/exRedo) event notifies your application whenever an Undo/Redo operation is performed. For instance, the ChartEndChanging(exUndoRedoUpdate) notifies whether a new operation is added/removed from the undo/redo queue.  Use the UndoRemoveAction method to remove the last actions from the undo queue. The RedoListAction property lists the Redo actions that can be performed in the chart. The CanUndo property specifies whether an undo operation can be performed if CTRL+Z key is pressed.

The Undo/Redo manager of the chart records operations in the following format:

Each action is on a single line, and each field is separated by ; character.  The lines are separated by "\r\n" characters ( vbCrLf in VB ). 

For instance, 

Here's a sample format of the UndoListAction property may get:

StartBlock
	MoveBar;119036136;E;6/30/2005;7/2/2005;6/27/2005;6/29/2005
	MoveBar;119033392;E;6/28/2005;7/6/2005;6/25/2005;7/3/2005
	MoveBar;118997728;;6/26/2005;7/2/2005;6/23/2005;6/29/2005
	MoveBar;118995016;;6/26/2005;7/6/2005;6/23/2005;7/3/2005
EndBlock
MoveBar;118970952;;6/21/2005;7/1/2005;6/21/2005;7/8/2005
DefineSummaryBars;118995016;;119036136;E
AddBar;119036136;E;Task;6/30/2005;7/2/2005
DefineSummaryBars;118995016;;119033392;E
AddBar;119033392;E;Task;6/28/2005;7/6/2005
DefineSummaryBars;118995016;;118997728;
AddBar;118997728;;Task;6/26/2005;7/2/2005
AddBar;118995016;;Summary;6/26/2005;7/6/2005
DefineSummaryBars;118970952;;118991088;E
GroupBars;118982672;E;0;118991088;E;-1;7
GroupBars;118982672;E;0;118991088;E;-1;39
AddLink;L2;118982672;E;118991088;E
AddBar;118991088;E;Task;6/25/2005;6/27/2005
GroupBars;118977632;;0;118982672;E;-1;7
GroupBars;118977632;;0;118982672;E;-1;39
AddLink;L1;118977632;;118982672;E
DefineSummaryBars;118970952;;118982672;E
AddBar;118982672;E;Task;6/23/2005;7/1/2005
DefineSummaryBars;118970952;;118977632;
AddBar;118977632;;Task;6/21/2005;6/28/2005
AddBar;118970952;;Summary;6/21/2005;7/1/2005

The following VB sample splits the UndoListAction value and adds each action to a listbox control:

List1.Clear
Dim s() As String
s = Split(G2antt1.Chart.UndoListAction, vbCrLf)
For i = LBound(s) To UBound(s)
            List1.AddItem s(i)
Next


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.