Show Unit1.pas syntax highlighted
unit Unit1;
interface
{$I GLScene.inc}
uses
//VCL
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, Buttons,
//GLScene
GLFireFX, GLBehaviours, XCollection,
//Strange Components
StrangeCollections, StrangeCollectionEditor, ELPropInsp,
StrangeIniObjects;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Button1: TButton;
ELPropertyInspector1: TELPropertyInspector;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Collection: TStrangeCollection;
Collection2: TStrangeCollection;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
ClassList: TStrangeClassList;
begin
//Controls collection
Collection := TStrangeCollection.Create(Self);
Collection.BaseType := TControl;
Collection.ItemsOwner := Self;
Collection.ItemsParent := Self;
ClassList := GetStrangeClassList;
Collection.ClassList := ClassList;
ClassList.Add(TButton);
ClassList.Add(TLabel);
ClassList.Add(TEdit);
ClassList.Add(TMemo);
ClassList.Add(TCheckBox);
ClassList.Add(TRadioButton);
//Class collection
Collection2 := TStrangeCollection.Create(Self);
Collection2.BaseType := TXCollectionItem;
Collection2.ItemsOwner := Self;
Collection2.ClassList := GetXCollectionClassList;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
GetStrangeCollectionEditor.SetCollection(Collection, ELPropertyInspector1);
GetStrangeCollectionEditor.Show;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Collection.Destroy;
Collection2.Destroy;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
GetStrangeCollectionEditor.SetCollection(Collection2, ELPropertyInspector1);
GetStrangeCollectionEditor.Show;
end;
end.
See more files for this project here