Removes the node with the specified Caption from the graph without deleting it. The graph searches for a node that matches the Caption parameter, if no node is found this method returns nil.
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 the specified node. In other words, the graph doesn't have to search 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
Caption
Type: String
Type: 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: Delphi |
var |