List of GraphLink (SimpleGraph)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

List of GraphLink (SimpleGraph)

Postby neverush » January 28th, 2012, 6:20 pm

Hi All,
In run-time I need to receive list of all GraphLinks only (without GraphNodes and other). I have to operate this list next (using text properties). Further work goes with use of arrays. How can I do it? (SimpleGraph 2.8, Codegear Delphi 2007)
neverush
Active Member
Active Member
 
Posts: 8
Joined: January 24th, 2012, 4:52 pm

Re: List of GraphLink (SimpleGraph)

Postby neverush » January 28th, 2012, 7:23 pm

I can answer to me myself. Perhaps it will help to somebody.

Code: Select all
procedure TMainForm.ListOfGraphLink(Sender: TObject);
var
  I, M: Integer;
  LinkArray: Array of TGraphLink;
begin
  M := 0;
  SetLength(LinkArray, SG1.ObjectsCount(TGraphLink));
  for I := 0 to SG1.Objects.Count - 1 do
    if SG1.Objects[I] is TGraphLink then
      begin
        LinkArray[M] := TGraphLink(SG1.Objects[I]);
        M := M + 1;
      end;
end;
neverush
Active Member
Active Member
 
Posts: 8
Joined: January 24th, 2012, 4:52 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 4 guests

cron