J
janker
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, VrLeds, RzPanel, ExtCtrls, StdCtrls, VrControls, VrButtons,
RzButton, Mask, RzEdit, cxControls, cxContainer, cxEdit, cxGroupBox;
type
TForm1 = class(TForm)
tmsvrsdbtn10: TVrShadowButton;
mmo1: TMemo;
rzpnl1: TRzPanel;
rzgrpb1: TRzGroupBox;
tmsvrul1: TVrUserLed;
tmsvrsdbtn1: TVrShadowButton;
tmsvrul2: TVrUserLed;
tmsvrsdbtn2: TVrShadowButton;
rzgrpb2: TRzGroupBox;
tmsvrul3: TVrUserLed;
tmsvrsdbtn3: TVrShadowButton;
tmsvrul4: TVrUserLed;
tmsvrsdbtn4: TVrShadowButton;
rzbtn1: TRzButton;
rzedt1: TRzEdit;
cxgpb1: TcxGroupBox;
tmsvrul5: TVrUserLed;
tmsvrsdbtn5: TVrShadowButton;
tmsvrul6: TVrUserLed;
tmsvrsdbtn6: TVrShadowButton;
procedure tmsvrsdbtn10Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.tmsvrsdbtn10Click(Sender: TObject);
var
i:Integer;
begin
mmo1.Clear;
mmo1.Lines.Add(IntToStr(rzgrpb1.ControlCount));
for i:=0 to rzgrpb1.ControlCount-1do
begin
mmo1.Lines.Add(rzgrpb1.Controls.Name);
end;
if rzgrpb1.FindComponent('tmsvrul1') <> nil then
begin
mmo1.Lines.Add('Find tmsvrul1');
end
else
begin
mmo1.Lines.Add('No Find tmsvrul1');
//运行这句
mmo1.Lines.Add(tmsvrul1.Parent.Name);
//显示rzgrpb1
end;
if rzgrpb1.FindChildControl('rzedt1') <> nil then
begin
mmo1.Lines.Add('Find rzedt1');
//运行这句
end
else
mmo1.Lines.Add('No Find rzedt1');
mmo1.Lines.Add('---------------------------------');
if cxgpb1.FindChildControl('tmsvrul5') <> nil then
begin
mmo1.Lines.Add('Find tmsvrul5');
end
else
begin
mmo1.Lines.Add('No Find tmsvrul5');
//运行这句
mmo1.Lines.Add(tmsvrul5.Parent.Name);
//显示cxgpb1
end;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, VrLeds, RzPanel, ExtCtrls, StdCtrls, VrControls, VrButtons,
RzButton, Mask, RzEdit, cxControls, cxContainer, cxEdit, cxGroupBox;
type
TForm1 = class(TForm)
tmsvrsdbtn10: TVrShadowButton;
mmo1: TMemo;
rzpnl1: TRzPanel;
rzgrpb1: TRzGroupBox;
tmsvrul1: TVrUserLed;
tmsvrsdbtn1: TVrShadowButton;
tmsvrul2: TVrUserLed;
tmsvrsdbtn2: TVrShadowButton;
rzgrpb2: TRzGroupBox;
tmsvrul3: TVrUserLed;
tmsvrsdbtn3: TVrShadowButton;
tmsvrul4: TVrUserLed;
tmsvrsdbtn4: TVrShadowButton;
rzbtn1: TRzButton;
rzedt1: TRzEdit;
cxgpb1: TcxGroupBox;
tmsvrul5: TVrUserLed;
tmsvrsdbtn5: TVrShadowButton;
tmsvrul6: TVrUserLed;
tmsvrsdbtn6: TVrShadowButton;
procedure tmsvrsdbtn10Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.tmsvrsdbtn10Click(Sender: TObject);
var
i:Integer;
begin
mmo1.Clear;
mmo1.Lines.Add(IntToStr(rzgrpb1.ControlCount));
for i:=0 to rzgrpb1.ControlCount-1do
begin
mmo1.Lines.Add(rzgrpb1.Controls.Name);
end;
if rzgrpb1.FindComponent('tmsvrul1') <> nil then
begin
mmo1.Lines.Add('Find tmsvrul1');
end
else
begin
mmo1.Lines.Add('No Find tmsvrul1');
//运行这句
mmo1.Lines.Add(tmsvrul1.Parent.Name);
//显示rzgrpb1
end;
if rzgrpb1.FindChildControl('rzedt1') <> nil then
begin
mmo1.Lines.Add('Find rzedt1');
//运行这句
end
else
mmo1.Lines.Add('No Find rzedt1');
mmo1.Lines.Add('---------------------------------');
if cxgpb1.FindChildControl('tmsvrul5') <> nil then
begin
mmo1.Lines.Add('Find tmsvrul5');
end
else
begin
mmo1.Lines.Add('No Find tmsvrul5');
//运行这句
mmo1.Lines.Add(tmsvrul5.Parent.Name);
//显示cxgpb1
end;
end;
end.