LCL: made TControl.SetVisible virtual. This fixes using TControl(AForm).Visible:=true during creation

git-svn-id: trunk@13621 -
This commit is contained in:
mattias 2008-01-04 19:14:18 +00:00
parent 2b730fd3d0
commit 92861f6679
3 changed files with 6 additions and 8 deletions

View File

@ -900,13 +900,13 @@ type
procedure SetShowHint(Value: Boolean);
procedure SetText(const Value: TCaption);
procedure SetTop(Value: Integer);
procedure SetVisible(Value: Boolean);
procedure SetWidth(Value: Integer);
protected
FControlState: TControlState;
FCursor: TCursor;
function GetCursor: TCursor; virtual;
procedure SetCursor(Value: TCursor); virtual;
procedure SetVisible(Value: Boolean); virtual;
protected
// sizing/aligning
procedure DoAutoSize; virtual;
@ -1916,7 +1916,8 @@ type
{ TDockTree - a tree of TDockZones - Every docked window has one tree
This is an abstract class. The real implementation is in ldocktree.pas.
This is an abstract class.
A real implementation can be found for example in ldocktree.pas.
Docking means here: Combining several windows to one. A window can here be
a TCustomForm or a floating control (undocked) or a TDockForm.
@ -2014,11 +2015,8 @@ type
FBorderWidth: Integer; // width of the border of the preview rectangle
FDockSite: TWinControl;
FDockZoneClass: TDockZoneClass;
//FGrabberSize: Integer;
//FGrabbersOnTop: Boolean;
FFlags: TDockTreeFlags;
FRootZone: TDockZone;
//FTopXYLimit: Integer;
FUpdateCount: Integer;
procedure DeleteZone(Zone: TDockZone);
protected

View File

@ -421,7 +421,6 @@ type
procedure SetModalResult(const AValue: TModalResult);
procedure SetPosition(Value : TPosition);
procedure SetShowInTaskbar(Value: TShowInTaskbar);
procedure SetVisible(Value: boolean);
procedure SetWindowFocus;
procedure SetWindowState(Value : TWindowState);
procedure WMActivate(var Message : TLMActivate); message LM_ACTIVATE;
@ -462,6 +461,7 @@ type
procedure SetZOrder(Topmost: Boolean); override;
procedure SetParent(NewParent: TWinControl); override;
procedure UpdateShowing; override;
procedure SetVisible(Value: boolean); override;
procedure DoFirstShow; virtual;
procedure UpdateWindowState;
procedure VisibleChanging; override;
@ -570,7 +570,7 @@ type
default stDefault;
property TextHeight: Longint read FDummyTextHeight write FDummyTextHeight
stored False;
property Visible write SetVisible stored VisibleIsStored default false;
property Visible stored VisibleIsStored default false;
property WindowState: TWindowState read FWindowState write SetWindowState
default wsNormal;
end;

View File

@ -335,7 +335,7 @@ begin
// will be done when finished loading
else
begin
inherited Visible:=Value;
inherited SetVisible(Value);
end;
//DebugLn(['[TCustomForm.SetVisible] END ',Name,':',ClassName,' ',Value,' ',(fsCreating in FFormState),' ',Visible]);
end;