Enables the graph to track when its nodes are changing.
Call BeginUpdateNodes before directly modifying nodes, and EndUpdateNodes after. The BeginUpdateNodes method calls every node's BeginUpdate method. Any new nodes created inside a BeginUpdateNodes/EndUpdateNodes block will also have its BeginUpdate methods called.
The BeginUpdateNodes method may be nested inside other BeginUpdateNodes method calls. The graph will not fire an
OnNodeChange event until an equal number of EndUpdateNodes method calls are made. Therefore, always ensure you protect the calling of the EndUpdateNodes method call in a try-finally block.
Namespace: GGraph
Delphi |
public |
The following example uses the Begin/End update methods to ensure no events fire while modifying the graph:
|