mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 01:57:57 +02:00
examples: fixed typo
git-svn-id: trunk@44516 -
This commit is contained in:
parent
519d7fa8c0
commit
bd0336f030
@ -178,7 +178,7 @@ procedure TMyWidgetMediator.Paint;
|
||||
Pen.Color:=clRed;
|
||||
Rectangle(0,0,AWidget.Width,AWidget.Height);
|
||||
// inner frame
|
||||
if AWidget.AcceptChildsAtDesignTime then begin
|
||||
if AWidget.AcceptChildrenAtDesignTime then begin
|
||||
Pen.Color:=clMaroon;
|
||||
Rectangle(AWidget.BorderLeft-1,AWidget.BorderTop-1,
|
||||
AWidget.Width-AWidget.BorderRight+1,
|
||||
@ -223,7 +223,7 @@ function TMyWidgetMediator.ParentAcceptsChild(Parent: TComponent;
|
||||
Child: TComponentClass): boolean;
|
||||
begin
|
||||
Result:=(Parent is TMyWidget) and (Child.InheritsFrom(TMyWidget))
|
||||
and (TMyWidget(Parent).AcceptChildsAtDesignTime);
|
||||
and (TMyWidget(Parent).AcceptChildrenAtDesignTime);
|
||||
end;
|
||||
|
||||
{ TFileDescPascalUnitWithMyForm }
|
||||
|
@ -51,7 +51,7 @@ type
|
||||
|
||||
TMyWidget = class(TComponent)
|
||||
private
|
||||
FAcceptChildsAtDesignTime: boolean;
|
||||
FAcceptChildrenAtDesignTime: boolean;
|
||||
FBorderBottom: integer;
|
||||
FBorderLeft: integer;
|
||||
FBorderRight: integer;
|
||||
@ -92,7 +92,7 @@ type
|
||||
procedure SetBounds(NewLeft, NewTop, NewWidth, NewHeight: integer); virtual;
|
||||
procedure InvalidateRect(ARect: TRect; Erase: boolean);
|
||||
procedure Invalidate;
|
||||
property AcceptChildsAtDesignTime: boolean read FAcceptChildsAtDesignTime;
|
||||
property AcceptChildrenAtDesignTime: boolean read FAcceptChildrenAtDesignTime;
|
||||
published
|
||||
property Left: integer read FLeft write SetLeft;
|
||||
property Top: integer read FTop write SetTop;
|
||||
@ -262,7 +262,7 @@ begin
|
||||
FBorderRight:=5;
|
||||
FBorderBottom:=5;
|
||||
FBorderTop:=20;
|
||||
FAcceptChildsAtDesignTime:=true;
|
||||
FAcceptChildrenAtDesignTime:=true;
|
||||
end;
|
||||
|
||||
destructor TMyWidget.Destroy;
|
||||
@ -327,7 +327,7 @@ end;
|
||||
constructor TMyButton.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FAcceptChildsAtDesignTime:=false;
|
||||
FAcceptChildrenAtDesignTime:=false;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user