home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 March
/
Chip_1999-03_cd.bin
/
zkuste
/
delphi
/
INFO
/
DI9806CJ.ZIP
/
PROPLSTU.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1998-03-17
|
1KB
|
64 lines
unit proplstu;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, typInfo;
type
TForm1 = class(TForm)
ListBox1: TListBox;
ComboBox1: TComboBox;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
begin
ComboBox1.Items.Clear;
for i := 0 to Form1.ComponentCount -1 do
ComboBox1.Items.Add(Form1.Components[i].Name);
ComboBox1.Text := '';
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
PropList: PPropList;
i: integer;
CompName: String;
begin
PropList := AllocMem(SizeOf(PropList^));
i := 0;
CompName := ComboBox1.Items[ComboBox1.ItemIndex];
ListBox1.Items.Clear;
try
GetPropList(FindComponent(CompName).ClassInfo,
tkProperties + [tkMethod], PropList);
while (PropList^[i] <> Nil) and (i < High(PropList^)) do
begin
ListBox1.Items.Add(PropList^[i].Name);
Inc(i);
end;
finally
FreeMem(PropList);
end;
end;
end.