examples: lvlgraph: use designer class

git-svn-id: trunk@40606 -
This commit is contained in:
mattias 2013-03-21 19:44:39 +00:00
parent 446f84c90a
commit 9e90c2665c
4 changed files with 28 additions and 19 deletions

View File

@ -1,7 +1,7 @@
object Form1: TForm1
Left = 161
Left = 456
Height = 474
Top = 149
Top = 192
Width = 754
Caption = 'Form1'
ClientHeight = 474
@ -37,4 +37,16 @@ object Form1: TForm1
Top = 0
Width = 5
end
object LvlGraphControl1: TLvlGraphControl
Left = 205
Height = 474
Top = 0
Width = 549
Align = alClient
NodeStyle.DefaultImageIndex = -1
NodeStyle.Coloring = lgncRGB
ParentColor = True
TabOrder = 2
TabStop = False
end
end

View File

@ -1,4 +1,4 @@
unit lvlgraph_dep_unit1;
unit LvlGraph_Dep_Unit1;
{$mode objfpc}{$H+}
@ -13,14 +13,13 @@ type
{ TForm1 }
TForm1 = class(TForm)
LvlGraphControl1: TLvlGraphControl;
Panel1: TPanel;
Splitter1: TSplitter;
TIPropertyGrid1: TTIPropertyGrid;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
@ -33,12 +32,8 @@ implementation
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var
LvlGraph: TLvlGraphControl;
begin
LvlGraph:=TLvlGraphControl.Create(Self);
with LvlGraph do begin
Name:='LvlGraph';
with LvlGraphControl1 do begin
Graph.GetEdge('-Project-','LCL',true);
Graph.GetEdge('-Project-','Cody',true);
Graph.GetEdge('Cody','IDEIntf',true);
@ -53,11 +48,9 @@ begin
Graph.GetEdge('Cody','LazUtils',true);
Graph.GetEdge('-Project-','OpenGLControl',true);
Graph.GetEdge('OpenGLControl','LCL',true);
Align:=alClient;
Parent:=Self;
end;
TIPropertyGrid1.TIObject:=LvlGraph;
TIPropertyGrid1.TIObject:=LvlGraphControl1;
end;
end.

View File

@ -27,18 +27,22 @@
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="4">
<Item1>
<PackageName Value="RunTimeTypeInfoControls"/>
<PackageName Value="LazControls"/>
</Item1>
<Item2>
<PackageName Value="Cody"/>
<PackageName Value="RunTimeTypeInfoControls"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
<PackageName Value="Cody"/>
</Item3>
<Item4>
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="2">
<Unit0>
@ -52,7 +56,7 @@
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="lvlgraph_dep_unit1"/>
<UnitName Value="LvlGraph_Dep_Unit1"/>
</Unit1>
</Units>
</ProjectOptions>

View File

@ -7,7 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, runtimetypeinfocontrols, lvlgraph_dep_unit1
Forms, runtimetypeinfocontrols, lazcontrols, lvlgraph_dep_unit1
{ you can add units after this };
{$R *.res}