Using SimpleGraph and a few questions

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

Using SimpleGraph and a few questions

Postby TiammatMX » March 8th, 2012, 5:30 pm

Hi there!

I've downloaded yesterday your SimpleGraph component, and I still have a little questions, specifically to the matter of drawing a series of shapes via Delphi code (not using mouse or keys). I'm using Delphi 6, if the tip can help.

Can you tell me how to draw a square and a circle using this component? My develop needs the ability to hit a button, draw a shape in a specific position, draw another and link them using three buttons, one for each process, because my user has a text describing some actions and I have to parse this text in a diagram not touched by the user.

I'll be very grateful to you if you can assist me in this matter.

Regards, and congratulations for the effort of making this great component!
Posts: 1
Joined: March 8th, 2012, 5:23 pm

Re: Using SimpleGraph and a few questions

Postby Stefan » March 16th, 2012, 10:53 am


Code: Select all
procedure TMainForm.SomeProc;
  r: TRect;
  gnA, gnB: TGraphNode;
  r.Left := 10;
  r.Top := 10;
  r.Right := 100;
  r.Bottom := 90;
  gnA := SimpleGraph.InsertNode(r, TRectangularNode);
  r.Left := r.Left + r.Right + 20;
  gnB := SimpleGraph.InsertNode(r, TEllipticNode);
  SimpleGraph.InsertLink(gnA, gnB);

Does that help?

User avatar
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands

Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests