home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programming Unleashed
/
Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso
/
chap28
/
object4
/
hierdlg.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-03-20
|
898b
|
49 lines
unit Hierdlg;
{ Program copyright (c) 1995 by Charles Calvert }
{ Project Name: OBJECT4 }
interface
uses
SysUtils, WinTypes, WinProcs,
Messages, Classes, Graphics,
Controls, Forms, Dialogs,
StdCtrls, Buttons, ClassDef;
type
THierarchyDlg = class(TForm)
ListBox1: TListBox;
BitBtn1: TBitBtn;
private
{ Private declarations }
public
{ Public declarations }
procedure Run(Widget: TWidget; AColor: TColor);
end;
var
HierarchyDlg: THierarchyDlg;
implementation
{$R *.DFM}
procedure THierarchyDlg.Run(Widget: TWidget; AColor: TColor);
var
AClass: TClass;
S: string;
begin
ListBox1.Clear;
ListBox1.Color := AColor;
S := ClassName;
AClass := Widget.ClassParent;
while AClass <> nil do begin
ListBox1.Items.Add(AClass.ClassName);
AClass := AClass.ClassParent;
end;
ShowModal;
end;
end.