Removes the specified node from the graph without deleting it.
Usually, deleting a node also frees the node. This method allows the node to be extracted without deleting it. You are responsible for freeing the extracted node. After extraction, the Graph property of the node is nil. To add the node back, set the Graph property.
The overloaded Extract method extracts a node based on its Caption property. In other words, the graph searches for a node that matches the Caption string.
Note |
---|
The extracted node's edges are deleted as a node cannot be connected to nodes in a graph and yet not be part of the graph. |
Namespace: GGraph
Delphi |
public |
Parameters
Node
Type: TGGraphNode
Type: TGGraphNode
TGCustomGraph.Extract(TGGraphNode)
The following code extracts two nodes from the graph, copies one node's Caption to the other and then reinserts the node back into the graph:
|