Board index » delphi » Container Types // getting a little confused

Container Types // getting a little confused

I "can" "see" my TServiceEvent after assigning a parent - (form1 in this
case), but I still cannot see my StopTime or StartTime.
Does creating an instance of TServiceEvent "auto-instantiate" StopTime and
StartTime or must I create an instance of each within TServiceEvent.Create?
*******************************
Type
TServiceEvent = Class(Tpanel)
protected
StopTime : TStopTime; {class(TCustomMaskEdit)}
StartTime : TStartTime; {class(TCustomMaskEdit)}
public
constructor Create(AOwner : TComponent);override;
end;
.....
.....
constructor TStartTime.Create(AOwner : TComponent);
begin
inherited create(AOwner);
      Left := 11;
      Top := 6;
      Width := 34;
      Height := 21;
      Visible := true;
end;

constructor TStopTime.Create(AOwner : TComponent);
begin
inherited create(AOwner);
      Left := 60;
      Top := 6;
      Width := 34;
      Height := 21;
      Visible := true;
end;

constructor TServiceEvent.Create(AOwner : TComponent);
begin
inherited create(AOwner);
      Width := 253;
      Height := 100;
      Text := '';
      Visible := true;
end;

--
ICQ 29412591

 

Re:Container Types // getting a little confused


uuummm
thanks anyway
My wife suggests I take a break
LOL

constructor TServiceEvent.Create(AOwner : TComponent);
begin
inherited create(AOwner);
      Width := 253;
      Height := 100;
      Text := '';
      Visible := true;
StopTime := TStopTime.create(self);
StopTime.parent := self;
StartTime := TStartTime.create(self);
StartTime.parent := self;
end;

Quote
"Donald Cameron" <came...@sympatico.ca> wrote in message

news:RGdu5.3676$WD3.110453@news20.bellglobal.com...
Quote
> I "can" "see" my TServiceEvent after assigning a parent - (form1 in this
> case), but I still cannot see my StopTime or StartTime.
> Does creating an instance of TServiceEvent "auto-instantiate" StopTime and
> StartTime or must I create an instance of each within

TServiceEvent.Create?
Quote
> *******************************
> Type
> TServiceEvent = Class(Tpanel)
> protected
> StopTime : TStopTime; {class(TCustomMaskEdit)}
> StartTime : TStartTime; {class(TCustomMaskEdit)}
> public
> constructor Create(AOwner : TComponent);override;
> end;
> .....
> .....
> constructor TStartTime.Create(AOwner : TComponent);
> begin
> inherited create(AOwner);
>       Left := 11;
>       Top := 6;
>       Width := 34;
>       Height := 21;
>       Visible := true;
> end;

> constructor TStopTime.Create(AOwner : TComponent);
> begin
> inherited create(AOwner);
>       Left := 60;
>       Top := 6;
>       Width := 34;
>       Height := 21;
>       Visible := true;
> end;

> constructor TServiceEvent.Create(AOwner : TComponent);
> begin
> inherited create(AOwner);
>       Width := 253;
>       Height := 100;
>       Text := '';
>       Visible := true;
> end;

> --
> ICQ 29412591

Other Threads