lcl: apply design-time alphablending on form create

git-svn-id: trunk@23569 -
This commit is contained in:
paul 2010-01-27 08:51:05 +00:00
parent b24bd8f15d
commit c135622fe5
2 changed files with 14 additions and 3 deletions

View File

@ -500,6 +500,7 @@ type
function HandleCreateException: Boolean; virtual;
function HandleDestroyException: Boolean; virtual;
function HandleShowHideException: Boolean; virtual;
procedure InitializeWnd; override;
procedure Loaded; override;
procedure ChildHandlesCreated; override;
procedure Notification(AComponent: TComponent; Operation : TOperation);override;

View File

@ -874,6 +874,18 @@ begin
Application.HandleException(Self);
end;
procedure TCustomForm.InitializeWnd;
begin
if not (csDesigning in ComponentState) then
begin
// set alpha value
TWSCustomFormClass(WidgetSetClass).SetAlphaBlend(Self, AlphaBlend, AlphaBlendValue);
// set allow drop files
TWSCustomFormClass(WidgetSetClass).SetAllowDropFiles(Self, FAllowDropFiles);
end;
inherited InitializeWnd;
end;
{------------------------------------------------------------------------------
Method: TCustomForm.PaintWindow
Params: none
@ -2105,9 +2117,7 @@ begin
LCLIntf.SetFocus(FActiveControl.Handle);
end;
end;
// set allow drop files
TWSCustomFormClass(WidgetSetClass).SetAllowDropFiles(Self, FAllowDropFiles);
// update icon
Perform(CM_ICONCHANGED, 0, 0);
//DebugLn('TCustomForm.CreateWnd END ',ClassName);