Type | Description | |||
StartUpdateLink as Long | A long expression that indicates the handle being returned by StartUpdateLink property. |
The AllowUndoRedo property specifies whether the chart supports undo/redo operations for objects in the chart such as bars or links. The ChartStartChanging(exUndo/exRedo) / ChartEndChanging(exUndo/exRedo) event notifies your application whenever an Undo/Redo operation is performed. The UndoListAction property lists the Undo actions that can be performed in the chart. The RedoListAction property lists the Redo actions that can be performed in the chart.
The following VB sample adds a new entry "UpdateLink" in the chart's undo/redo queue for changing the text being displayed on the link ( /COM version ):
With G2antt1.Items Dim linkKey As Variant linkKey = .FirstLink Dim iChangeLink As Long iChangeLink = .StartUpdateLink(linkKey) .Link(linkKey, exLinkText) = "new text" .EndUpdateLink (iChangeLink) End With
The following VB/NET sample adds a new entry "UpdateLink" in the chart's undo/redo queue for changing the text being displayed on the link ( /NET Assembly version ):
With Exg2antt1.Items Dim linkKey As Object = .get_FirstLink Dim iChangeLink As Long = .get_StartUpdateLink(linkKey) .set_Link(linkKey, exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkText, "new text") .EndUpdateLink(iChangeLink) End With
These samples add new entries to undo/redo queue as : "UpdateLink;L1;12;;new text " which indicates , the link as being L1, the 12 indicates the exLinkText predefined value, and so on. Once the sample is called, the link's text is changed, and using the CTRL + Z, you can restore back the old value, or pressing the CTRL + Y you can change back after restoring.