LCL: added hidden published property TForm.LCLVersion, bug

git-svn-id: trunk@14270 -
This commit is contained in:
mattias 2008-02-27 11:15:16 +00:00
parent 7fb3c565e0
commit 3e7f7a99cc
3 changed files with 26 additions and 2 deletions

View File

@ -6139,6 +6139,8 @@ begin
TFileDialog, 'Filter', TFileDlgFilterProperty);
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('AnsiString'),
TFileNameEdit, 'Filter', TFileDlgFilterProperty);
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('AnsiString'),
TCustomPropertyStorage, 'Filename', TFileNamePropertyEditor);
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('TAnchorSide'),
TControl, 'AnchorSideLeft', THiddenPropertyEditor);
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('TAnchorSide'),
@ -6152,7 +6154,7 @@ begin
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('longint'),
TControl, 'ClientHeight', THiddenPropertyEditor);
RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('AnsiString'),
TCustomPropertyStorage, 'Filename', TFileNamePropertyEditor);
TForm, 'LCLVersion', THiddenPropertyEditor);
end;
procedure FinalPropEdits;

View File

@ -38,7 +38,7 @@ interface
uses
Classes, SysUtils, TypInfo, Math,
AvgLvlTree, Maps, LCLStrConsts, LCLType, LCLProc, LCLIntf,
AvgLvlTree, Maps, LCLVersion, LCLStrConsts, LCLType, LCLProc, LCLIntf,
InterfaceBase, LResources, GraphType, Graphics, Menus, LMessages, CustomTimer,
ActnList, ClipBrd, CustApp, HelpIntfs, LCLClasses, Controls;
@ -580,9 +580,13 @@ type
TForm = class(TCustomForm)
private
FClientHandle: HWND;
FLCLVersion: string;
function LCLVersionIsStored: boolean;
protected
procedure CreateWnd; override;
procedure Loaded; override;
public
constructor Create(TheOwner: TComponent); override;
property ClientHandle: HWND read FClientHandle;
property DockManager;
published
@ -651,6 +655,7 @@ type
property ShowHint;
property ShowInTaskBar;
property UseDockManager;
property LCLVersion: string read FLCLVersion write FLCLVersion stored LCLVersionIsStored;
property Visible;
property WindowState;
end;

View File

@ -2085,6 +2085,11 @@ end;
{ TForm }
function TForm.LCLVersionIsStored: boolean;
begin
Result:=Parent=nil;
end;
procedure TForm.CreateWnd;
begin
if (Application<>nil) then
@ -2092,6 +2097,18 @@ begin
inherited CreateWnd;
end;
procedure TForm.Loaded;
begin
inherited Loaded;
FLCLVersion:=lcl_version;
end;
constructor TForm.Create(TheOwner: TComponent);
begin
FLCLVersion:=lcl_version;
inherited Create(TheOwner);
end;
//==============================================================================
{ TFormPropertyStorage }