understand SimpleGraph

Please discuss general Delphi programming topics here.

understand SimpleGraph

Postby Zegechel » December 3rd, 2013, 2:59 pm

hello,
first thank you very much for your work "SimpleGraph" is magic for me O:)

i have test demo programme but i don't anderstand what i need do for create a node vithout mouse

exemple :
SimpleGraph.creatnode(left,top,height,with,'text'...)
SimpleGraph.creatlink(node1,node2,text...)

i think is no so easy ...

and i want save Graph properties in database is that possible

King regard
Zegechel
Member
Member
 
Posts: 2
Joined: December 3rd, 2013, 2:23 pm

Re: understand SimpleGraph

Postby Zegechel » December 4th, 2013, 8:28 am

sorry I had not searched enough...
verry simple with "unit NodeProp"

procedure TMainForm.Button1Click(Sender: TObject);
var
rect:trect;
begin
rect.top:=100;
rect.Left:=500;
rect.Width:=130;
rect.Height:=50;
SimpleGraph.InsertNode(rect,TRectangularNode);
with TGraphNode(SimpleGraph.Objects.Last) do
begin
BeginUpdate;
try
//Alignment := taLeftJustify, taCenter, taRightJustify; (horizontal)
Alignment := taCenter;
// Layout := tlTop, tlCenter, tlBottom; (Vertical)
Layout := tlCenter;
// caption of node
Text := 'test1'+chr(10)+'test2';
// fill color
Brush.Color := claqua;
// border color
Pen.Color := clRed;
// use pngimagelist
Background.Bitmap.Assign(PngImageList1.PngImages.Items[7].PngImage); // have problème here the bitmap take same place a node :-k
// with imaglist : ImageList.GetBitmap(2,Background.Bitmap); // same problem

finally
EndUpdate;
end;
end;
end;



I am now looking for link and to retrieve these values ​​from an existing object ...
aventure be continued ^^
Zegechel
Member
Member
 
Posts: 2
Joined: December 3rd, 2013, 2:23 pm


Return to Delphi Programming

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron