南
南腔北调
Unregistered / Unconfirmed
GUEST, unregistred user!
unit GroupBox1;
interface
uses
SysUtils, Classes, Controls, StdCtrls,ComboBoxEnter;
type
TGroupBox1 = class(TGroupBox)
chaddlab1:tlabel;
chaddlab2:tlabel;
chaddlab3:tlabel;
chsheng:TComboBoxEnter;
chcity:TComboBoxEnter;
chcityzone:TComboBoxEnter;
private
{ Private declarations }
protected
{ Protected declarations }
public
constructor Create (AOwner:TComponent);override;
procedure CreateWnd;override;
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('CHGroupware', [TGroupBox1]);
end;
{ TGroupBox1 }
constructor TGroupBox1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
if Assigned(chaddlab1) then exit;
chaddlab1:=tlabel.Create(AOwner);
chaddlab1.Parent:=self;
chaddlab1.FocusControl:=self;
chaddlab1.Top:=24;
chaddlab1.Left:=16;
chaddlab1.Name:='chaddlab1';
chaddlab1.Caption:='省份:';
chaddlab2:=tlabel.Create(AOwner);
chaddlab2.Parent:=self;
chaddlab2.FocusControl:=self;
chaddlab2.Top:=49;
chaddlab2.Left:=16;
chaddlab2.Name:='chaddlab2';
chaddlab2.Caption:='城市:';
chaddlab3:=tlabel.Create(AOwner);
chaddlab3.Parent:=self;
chaddlab3.FocusControl:=self;
chaddlab3.Top:=73;
chaddlab3.Left:=16;
chaddlab3.Name:='chaddlab3';
chaddlab3.Caption:='城区:';
chsheng:=TComboBoxEnter.Create(AOwner);
chsheng.Parent:=self;
chsheng.Name:='chsheng';
chsheng.Style:=csDropDownList;
chsheng.Top:=21;
chsheng.Left:=51;
chsheng.Width:=105;
chcity:=TComboBoxEnter.Create(AOwner);
chcity.Parent:=self;
chcity.Name:='chcity';
chcity.Style:=csDropDownList;
chcity.Top:=45;
chcity.Left:=51;
chcity.Width:=105;
chcityzone:=TComboBoxEnter.Create(AOwner);
chcityzone.Parent:=self;
chcityzone.Name:='chcityzone';
chcityzone.Style:=csDropDownList;
chcityzone.Top:=69;
chcityzone.Left:=51;
chcityzone.Width:=105;
end;
procedure TGroupBox1.CreateWnd;
begin
inherited;
end;
end.
但是label均可显示出来。。。求各位指点一下。。。
interface
uses
SysUtils, Classes, Controls, StdCtrls,ComboBoxEnter;
type
TGroupBox1 = class(TGroupBox)
chaddlab1:tlabel;
chaddlab2:tlabel;
chaddlab3:tlabel;
chsheng:TComboBoxEnter;
chcity:TComboBoxEnter;
chcityzone:TComboBoxEnter;
private
{ Private declarations }
protected
{ Protected declarations }
public
constructor Create (AOwner:TComponent);override;
procedure CreateWnd;override;
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('CHGroupware', [TGroupBox1]);
end;
{ TGroupBox1 }
constructor TGroupBox1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
if Assigned(chaddlab1) then exit;
chaddlab1:=tlabel.Create(AOwner);
chaddlab1.Parent:=self;
chaddlab1.FocusControl:=self;
chaddlab1.Top:=24;
chaddlab1.Left:=16;
chaddlab1.Name:='chaddlab1';
chaddlab1.Caption:='省份:';
chaddlab2:=tlabel.Create(AOwner);
chaddlab2.Parent:=self;
chaddlab2.FocusControl:=self;
chaddlab2.Top:=49;
chaddlab2.Left:=16;
chaddlab2.Name:='chaddlab2';
chaddlab2.Caption:='城市:';
chaddlab3:=tlabel.Create(AOwner);
chaddlab3.Parent:=self;
chaddlab3.FocusControl:=self;
chaddlab3.Top:=73;
chaddlab3.Left:=16;
chaddlab3.Name:='chaddlab3';
chaddlab3.Caption:='城区:';
chsheng:=TComboBoxEnter.Create(AOwner);
chsheng.Parent:=self;
chsheng.Name:='chsheng';
chsheng.Style:=csDropDownList;
chsheng.Top:=21;
chsheng.Left:=51;
chsheng.Width:=105;
chcity:=TComboBoxEnter.Create(AOwner);
chcity.Parent:=self;
chcity.Name:='chcity';
chcity.Style:=csDropDownList;
chcity.Top:=45;
chcity.Left:=51;
chcity.Width:=105;
chcityzone:=TComboBoxEnter.Create(AOwner);
chcityzone.Parent:=self;
chcityzone.Name:='chcityzone';
chcityzone.Style:=csDropDownList;
chcityzone.Top:=69;
chcityzone.Left:=51;
chcityzone.Width:=105;
end;
procedure TGroupBox1.CreateWnd;
begin
inherited;
end;
end.
但是label均可显示出来。。。求各位指点一下。。。