[Lazarus] constructor Create How is it work?
FreeMan
freeman35 at delphiturkiye.com
Tue Mar 4 10:50:33 CET 2014
Hello,
constructor Create how is work ? In IDE not problem, but In application,
form created AOwner not nil, self created, FGrid created, but
Self.Parent is NILL ??? Self.left is 0 (not because its 10) all
Self.BoundsRect value is 0. Why? for test I added that code to in
@EditChange procedure (FGrid.Parent := Self.Parent; this line and
later) values is been correct, But in create not work properly.
Has any one any idea?
Thank you
type
TExLookUp = class(TCustomEditButton)
private
FGrid: TRxDBGrid;
Public
constructor Create(AOwner: TComponent); override;
.....
constructor TExLookUp.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Self.OnChange := @EditChange;
FGrid := TRxDBGrid.Create(Self);
FGrid.Parent := Self.Parent;
FGrid.Left := Self.Left;
FGrid.Top := Self.BoundsRect.Bottom-4;
FGrid.Width := Self.BoundsRect.Right - Self.BoundsRect.Left;
More information about the Lazarus
mailing list