I created a simple component (Delphi 7) that basically
consists of two TEdit desendants on a TCustomPanel. If I
place it directly on a form with TLabels and
TSpeedButtons, it works, but if I place it on a
TScrollBox that contains TLabels and TSpeedButtons, the
labels/speedbuttons don't appear when the form is
created.
If I then move the form offscreen, then bring it back,
the labels/speedbuttons appear. This also happens in the
IDE at designtime.
Does anyone have any idea as to why this would be?
Here's what I have in the creation/destruction code. All
I can think is that maybe I'm doing something wrong here:
constructor TKjpMoneyRangeEdit.Create(AOwner:
TComponent);
begin
inherited Create(AOwner);
Width := 129;
Height := 21;
Caption := 'to';
BorderWidth := 0;
BorderStyle := bsNone;
BevelInner := bvNone;
BevelOuter := bvNone;
MoneyEdit1 := TKpMoneyEdit.Create(Self);
MoneyEdit2 := TKpMoneyEdit.Create(Self);
end;
destructor TKjpMoneyRangeEdit.Destroy;
begin
FreeAndNil(MoneyEdit1);
FreeAndNil(MoneyEdit2);
inherited Destroy;
end;
procedure TKjpMoneyRangeEdit.CreateWnd;
begin
inherited CreateWnd;
with MoneyEdit1 do begin
Parent := Self;
Width := 57;
Left := 0;
Top := 0;
end;
with MoneyEdit2 do begin
Parent := Self;
Width := 57;
Left := 72;
Top := 0;
end;
end;
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi