mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 00:30:34 +01:00
lcl: highDPI: use TCustomDesignControl as ancestor for TFrame and TForm to share PPI properties.
git-svn-id: trunk@53580 -
This commit is contained in:
parent
0b202568c5
commit
33199744d0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7133,6 +7133,7 @@ lcl/include/customcombobox.inc svneol=native#text/pascal
|
|||||||
lcl/include/customcontrol.inc svneol=native#text/pascal
|
lcl/include/customcontrol.inc svneol=native#text/pascal
|
||||||
lcl/include/customdbcombobox.inc svneol=native#text/pascal
|
lcl/include/customdbcombobox.inc svneol=native#text/pascal
|
||||||
lcl/include/customdblistbox.inc svneol=native#text/pascal
|
lcl/include/customdblistbox.inc svneol=native#text/pascal
|
||||||
|
lcl/include/customdesigncontrol.inc svneol=native#text/pascal
|
||||||
lcl/include/customdockform.inc svneol=native#text/pascal
|
lcl/include/customdockform.inc svneol=native#text/pascal
|
||||||
lcl/include/customedit.inc svneol=native#text/pascal
|
lcl/include/customedit.inc svneol=native#text/pascal
|
||||||
lcl/include/customflowpanel.inc svneol=native#text/pascal
|
lcl/include/customflowpanel.inc svneol=native#text/pascal
|
||||||
|
|||||||
50
lcl/forms.pp
50
lcl/forms.pp
@ -251,18 +251,30 @@ type
|
|||||||
property OnPaint;
|
property OnPaint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TCustomDesignControl = class(TScrollingWinControl)
|
||||||
|
protected
|
||||||
|
FDesignTimePPI: Integer;
|
||||||
|
FPixelsPerInch: Integer;
|
||||||
|
|
||||||
|
procedure SetDesignTimePPI(const ADesignTimePPI: Integer);
|
||||||
|
protected
|
||||||
|
procedure Loaded; override;
|
||||||
|
public
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
public
|
||||||
|
property DesignTimePPI: Integer read FDesignTimePPI write SetDesignTimePPI default 96;
|
||||||
|
property PixelsPerInch: Integer read FPixelsPerInch write FPixelsPerInch stored False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TCustomFrame }
|
{ TCustomFrame }
|
||||||
|
|
||||||
TCustomFrame = class(TScrollingWinControl)
|
TCustomFrame = class(TCustomDesignControl)
|
||||||
private
|
private
|
||||||
FDesignTimePPI: Integer;
|
|
||||||
FPixelsPerInch: Integer;
|
|
||||||
procedure AddActionList(ActionList: TCustomActionList);
|
procedure AddActionList(ActionList: TCustomActionList);
|
||||||
procedure RemoveActionList(ActionList: TCustomActionList);
|
procedure RemoveActionList(ActionList: TCustomActionList);
|
||||||
procedure ReadDesignLeft(Reader: TReader);
|
procedure ReadDesignLeft(Reader: TReader);
|
||||||
procedure ReadDesignTop(Reader: TReader);
|
procedure ReadDesignTop(Reader: TReader);
|
||||||
procedure SetDesignTimePPI(const aDesignTimePPI: Integer);
|
|
||||||
procedure WriteDesignLeft(Writer: TWriter);
|
procedure WriteDesignLeft(Writer: TWriter);
|
||||||
procedure WriteDesignTop(Writer: TWriter);
|
procedure WriteDesignTop(Writer: TWriter);
|
||||||
protected
|
protected
|
||||||
@ -273,7 +285,6 @@ type
|
|||||||
procedure DefineProperties(Filer: TFiler); override;
|
procedure DefineProperties(Filer: TFiler); override;
|
||||||
procedure CalculatePreferredSize(var PreferredWidth,
|
procedure CalculatePreferredSize(var PreferredWidth,
|
||||||
PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
||||||
procedure Loaded; override;
|
|
||||||
procedure AutoAdjustLayout(AMode: TLayoutAdjustmentPolicy; const AFromDPI,
|
procedure AutoAdjustLayout(AMode: TLayoutAdjustmentPolicy; const AFromDPI,
|
||||||
AToDPI, AOldFormWidth, ANewFormWidth: Integer;
|
AToDPI, AOldFormWidth, ANewFormWidth: Integer;
|
||||||
const AScaleFonts: Boolean); override;
|
const AScaleFonts: Boolean); override;
|
||||||
@ -281,9 +292,6 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
||||||
class function GetControlClassDefaultSize: TSize; override;
|
class function GetControlClassDefaultSize: TSize; override;
|
||||||
public
|
|
||||||
property DesignTimePPI: Integer read FDesignTimePPI write SetDesignTimePPI default 96;
|
|
||||||
property PixelsPerInch: Integer read FPixelsPerInch write FPixelsPerInch;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TCustomFrameClass = class of TCustomFrame;
|
TCustomFrameClass = class of TCustomFrame;
|
||||||
@ -413,7 +421,7 @@ type
|
|||||||
TModalDialogFinished = procedure (Sender: TObject; AResult: Integer) of object;
|
TModalDialogFinished = procedure (Sender: TObject; AResult: Integer) of object;
|
||||||
|
|
||||||
|
|
||||||
TCustomForm = class(TScrollingWinControl)
|
TCustomForm = class(TCustomDesignControl)
|
||||||
private
|
private
|
||||||
FActive: Boolean;
|
FActive: Boolean;
|
||||||
FActiveControl: TWinControl;
|
FActiveControl: TWinControl;
|
||||||
@ -453,7 +461,6 @@ type
|
|||||||
FOnShortcut: TShortCutEvent;
|
FOnShortcut: TShortCutEvent;
|
||||||
FOnShow: TNotifyEvent;
|
FOnShow: TNotifyEvent;
|
||||||
FOnWindowStateChange: TNotifyEvent;
|
FOnWindowStateChange: TNotifyEvent;
|
||||||
FPixelsPerInch: Longint;
|
|
||||||
FPosition: TPosition;
|
FPosition: TPosition;
|
||||||
FRealizedShowInTaskBar: TShowInTaskbar;
|
FRealizedShowInTaskBar: TShowInTaskbar;
|
||||||
FRestoredLeft: integer;
|
FRestoredLeft: integer;
|
||||||
@ -462,7 +469,6 @@ type
|
|||||||
FRestoredHeight: integer;
|
FRestoredHeight: integer;
|
||||||
FShowInTaskbar: TShowInTaskbar;
|
FShowInTaskbar: TShowInTaskbar;
|
||||||
FWindowState: TWindowState;
|
FWindowState: TWindowState;
|
||||||
FDesignTimePPI: Integer;
|
|
||||||
FScaled: Boolean;
|
FScaled: Boolean;
|
||||||
function GetClientHandle: HWND;
|
function GetClientHandle: HWND;
|
||||||
function GetEffectiveShowInTaskBar: TShowInTaskBar;
|
function GetEffectiveShowInTaskBar: TShowInTaskBar;
|
||||||
@ -481,7 +487,6 @@ type
|
|||||||
procedure SetAlphaBlend(const AValue: Boolean);
|
procedure SetAlphaBlend(const AValue: Boolean);
|
||||||
procedure SetAlphaBlendValue(const AValue: Byte);
|
procedure SetAlphaBlendValue(const AValue: Byte);
|
||||||
procedure SetBorderIcons(NewIcons: TBorderIcons);
|
procedure SetBorderIcons(NewIcons: TBorderIcons);
|
||||||
procedure SetDesignTimePPI(const aDesignTimePPI: Integer);
|
|
||||||
procedure SetFormBorderStyle(NewStyle: TFormBorderStyle);
|
procedure SetFormBorderStyle(NewStyle: TFormBorderStyle);
|
||||||
procedure SetCancelControl(NewControl: TControl);
|
procedure SetCancelControl(NewControl: TControl);
|
||||||
procedure SetDefaultControl(NewControl: TControl);
|
procedure SetDefaultControl(NewControl: TControl);
|
||||||
@ -671,8 +676,7 @@ type
|
|||||||
property DefaultMonitor: TDefaultMonitor read FDefaultMonitor
|
property DefaultMonitor: TDefaultMonitor read FDefaultMonitor
|
||||||
write FDefaultMonitor default dmActiveForm;
|
write FDefaultMonitor default dmActiveForm;
|
||||||
property Designer: TIDesigner read FDesigner write FDesigner;
|
property Designer: TIDesigner read FDesigner write FDesigner;
|
||||||
property DesignTimeDPI: Integer read FDesignTimePPI write SetDesignTimePPI default 96; deprecated 'Use DesignTimePPI instead. DesignTimeDPI will be removed in 1.8';
|
property DesignTimeDPI: Integer read FDesignTimePPI write SetDesignTimePPI stored False; deprecated 'Use DesignTimePPI instead. DesignTimeDPI will be removed in 1.8';
|
||||||
property DesignTimePPI: Integer read FDesignTimePPI write SetDesignTimePPI default 96;
|
|
||||||
property EffectiveShowInTaskBar: TShowInTaskBar read GetEffectiveShowInTaskBar;
|
property EffectiveShowInTaskBar: TShowInTaskBar read GetEffectiveShowInTaskBar;
|
||||||
property FormState: TFormState read FFormState;
|
property FormState: TFormState read FFormState;
|
||||||
property FormStyle: TFormStyle read FFormStyle write SetFormStyle
|
property FormStyle: TFormStyle read FFormStyle write SetFormStyle
|
||||||
@ -704,7 +708,6 @@ type
|
|||||||
property OnWindowStateChange: TNotifyEvent
|
property OnWindowStateChange: TNotifyEvent
|
||||||
read FOnWindowStateChange write FOnWindowStateChange;
|
read FOnWindowStateChange write FOnWindowStateChange;
|
||||||
property ParentFont default False;
|
property ParentFont default False;
|
||||||
property PixelsPerInch: Longint read FPixelsPerInch write FPixelsPerInch stored False;
|
|
||||||
property Position: TPosition read FPosition write SetPosition default poDesigned;
|
property Position: TPosition read FPosition write SetPosition default poDesigned;
|
||||||
property RestoredLeft: integer read FRestoredLeft;
|
property RestoredLeft: integer read FRestoredLeft;
|
||||||
property RestoredTop: integer read FRestoredTop;
|
property RestoredTop: integer read FRestoredTop;
|
||||||
@ -1778,6 +1781,7 @@ function GetFirstParentForm(Control:TControl): TCustomForm;
|
|||||||
function ValidParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
|
function ValidParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
|
||||||
function GetDesignerForm(APersistent: TPersistent): TCustomForm;
|
function GetDesignerForm(APersistent: TPersistent): TCustomForm;
|
||||||
function FindRootDesigner(APersistent: TPersistent): TIDesigner;
|
function FindRootDesigner(APersistent: TPersistent): TIDesigner;
|
||||||
|
function NeedParentDesignControl(Control: TControl): TCustomDesignControl;
|
||||||
|
|
||||||
function IsAccel(VK: word; const Str: string): Boolean;
|
function IsAccel(VK: word; const Str: string): Boolean;
|
||||||
procedure NotifyApplicationUserInput(Target: TControl; Msg: Cardinal);
|
procedure NotifyApplicationUserInput(Target: TControl; Msg: Cardinal);
|
||||||
@ -1981,6 +1985,21 @@ begin
|
|||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
function NeedParentDesignControl(Control: TControl): TCustomDesignControl;
|
||||||
|
var
|
||||||
|
SControl: TControl;
|
||||||
|
begin
|
||||||
|
SControl := Control;
|
||||||
|
while (Control <> nil) and (Control.Parent <> nil) do
|
||||||
|
Control := Control.Parent;
|
||||||
|
|
||||||
|
if Control is TCustomDesignControl then
|
||||||
|
Result := TCustomDesignControl(Control)
|
||||||
|
else
|
||||||
|
raise EInvalidOperation.CreateFmt(rsControlHasNoParentFormOrFrame, [SControl.Name]);
|
||||||
|
end;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function GetDesignerForm(Control: TControl): TCustomForm;
|
function GetDesignerForm(Control: TControl): TCustomForm;
|
||||||
begin
|
begin
|
||||||
@ -2154,6 +2173,7 @@ end;
|
|||||||
{$I controlscrollbar.inc}
|
{$I controlscrollbar.inc}
|
||||||
{$I scrollingwincontrol.inc}
|
{$I scrollingwincontrol.inc}
|
||||||
{$I scrollbox.inc}
|
{$I scrollbox.inc}
|
||||||
|
{$I customdesigncontrol.inc}
|
||||||
{$I customframe.inc}
|
{$I customframe.inc}
|
||||||
{$I customform.inc}
|
{$I customform.inc}
|
||||||
{$I customdockform.inc}
|
{$I customdockform.inc}
|
||||||
|
|||||||
@ -766,58 +766,34 @@ end;
|
|||||||
|
|
||||||
function TControl.ScaleCoord(const ASize: Integer): Integer;
|
function TControl.ScaleCoord(const ASize: Integer): Integer;
|
||||||
var
|
var
|
||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomDesignControl;
|
||||||
begin
|
begin
|
||||||
ParentForm := GetParentForm(Self);
|
ParentForm := NeedParentDesignControl(Self);
|
||||||
if ParentForm=nil then
|
Result := MulDiv(ASize, ParentForm.PixelsPerInch, ParentForm.DesignTimePPI);
|
||||||
raise EInvalidOperation.CreateFmt(rsControlHasNoParentForm, [Name]);
|
|
||||||
|
|
||||||
if ParentForm.DesignTimePPI=ParentForm.PixelsPerInch then
|
|
||||||
Result := ASize
|
|
||||||
else
|
|
||||||
Result := MulDiv(ASize, ParentForm.PixelsPerInch, ParentForm.DesignTimePPI);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControl.ScaleCoord96(const ASize: Integer): Integer;
|
function TControl.ScaleCoord96(const ASize: Integer): Integer;
|
||||||
var
|
var
|
||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomDesignControl;
|
||||||
begin
|
begin
|
||||||
ParentForm := GetParentForm(Self);
|
ParentForm := NeedParentDesignControl(Self);
|
||||||
if ParentForm=nil then
|
Result := MulDiv(ASize, ParentForm.PixelsPerInch, 96);
|
||||||
raise EInvalidOperation.CreateFmt(rsControlHasNoParentForm, [Name]);
|
|
||||||
|
|
||||||
if ParentForm.PixelsPerInch=96 then
|
|
||||||
Result := ASize
|
|
||||||
else
|
|
||||||
Result := MulDiv(ASize, ParentForm.PixelsPerInch, 96);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControl.ScaleCoord96Back(const ASize: Integer): Integer;
|
function TControl.ScaleCoord96Back(const ASize: Integer): Integer;
|
||||||
var
|
var
|
||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomDesignControl;
|
||||||
begin
|
begin
|
||||||
ParentForm := GetParentForm(Self);
|
ParentForm := NeedParentDesignControl(Self);
|
||||||
if ParentForm=nil then
|
Result := MulDiv(ASize, 96, ParentForm.PixelsPerInch);
|
||||||
raise EInvalidOperation.CreateFmt(rsControlHasNoParentForm, [Name]);
|
|
||||||
|
|
||||||
if ParentForm.PixelsPerInch=96 then
|
|
||||||
Result := ASize
|
|
||||||
else
|
|
||||||
Result := MulDiv(ASize, 96, ParentForm.PixelsPerInch);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControl.ScaleCoordBack(const ASize: Integer): Integer;
|
function TControl.ScaleCoordBack(const ASize: Integer): Integer;
|
||||||
var
|
var
|
||||||
ParentForm: TCustomForm;
|
ParentForm: TCustomDesignControl;
|
||||||
begin
|
begin
|
||||||
ParentForm := GetParentForm(Self);
|
ParentForm := NeedParentDesignControl(Self);
|
||||||
if ParentForm=nil then
|
Result := MulDiv(ASize, ParentForm.DesignTimePPI, ParentForm.PixelsPerInch);
|
||||||
raise EInvalidOperation.CreateFmt(rsControlHasNoParentForm, [Name]);
|
|
||||||
|
|
||||||
if ParentForm.DesignTimePPI=ParentForm.PixelsPerInch then
|
|
||||||
Result := ASize
|
|
||||||
else
|
|
||||||
Result := MulDiv(ASize, ParentForm.DesignTimePPI, ParentForm.PixelsPerInch);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
|||||||
38
lcl/include/customdesigncontrol.inc
Normal file
38
lcl/include/customdesigncontrol.inc
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{%MainUnit ../forms.pp}
|
||||||
|
|
||||||
|
{
|
||||||
|
*****************************************************************************
|
||||||
|
This file is part of the Lazarus Component Library (LCL)
|
||||||
|
|
||||||
|
See the file COPYING.modifiedLGPL.txt, included in this distribution,
|
||||||
|
for details about the license.
|
||||||
|
*****************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
{ TCustomDesignControl }
|
||||||
|
|
||||||
|
constructor TCustomDesignControl.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
|
||||||
|
FDesignTimePPI := 96;
|
||||||
|
FPixelsPerInch := FDesignTimePPI;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomDesignControl.Loaded;
|
||||||
|
begin
|
||||||
|
inherited Loaded;
|
||||||
|
|
||||||
|
if csDesigning in ComponentState then
|
||||||
|
FDesignTimePPI := Screen.PixelsPerInch;
|
||||||
|
FPixelsPerInch := FDesignTimePPI;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomDesignControl.SetDesignTimePPI(const ADesignTimePPI: Integer);
|
||||||
|
begin
|
||||||
|
if (csLoading in ComponentState) // allow setting only when loading
|
||||||
|
or not (csDesigning in ComponentState) then // or in runtime (the programmer has to know why he is doing that)
|
||||||
|
FDesignTimePPI := ADesignTimePPI
|
||||||
|
else
|
||||||
|
raise EInvalidOperation.Create(sCannotSetDesignTimePPI);
|
||||||
|
end;
|
||||||
@ -354,15 +354,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomForm.SetDesignTimePPI(const aDesignTimePPI: Integer);
|
|
||||||
begin
|
|
||||||
if (csLoading in ComponentState) // allow setting only when loading
|
|
||||||
or not (csDesigning in ComponentState) then // or in runtime (the programmer has to know why he is doing that)
|
|
||||||
FDesignTimePPI := aDesignTimePPI
|
|
||||||
else
|
|
||||||
raise EInvalidOperation.Create(sCannotSetDesignTimePPI);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomForm.SetIcon
|
Method: TCustomForm.SetIcon
|
||||||
Params: the new icon
|
Params: the new icon
|
||||||
@ -2062,8 +2053,6 @@ begin
|
|||||||
FShowInTaskbar := stDefault;
|
FShowInTaskbar := stDefault;
|
||||||
FAlphaBlend := False;
|
FAlphaBlend := False;
|
||||||
FAlphaBlendValue := 255;
|
FAlphaBlendValue := 255;
|
||||||
FDesignTimePPI := 96;
|
|
||||||
FPixelsPerInch := FDesignTimePPI;
|
|
||||||
// set border style before handle is allocated
|
// set border style before handle is allocated
|
||||||
if not (fsBorderStyleChanged in FFormState) then
|
if not (fsBorderStyleChanged in FFormState) then
|
||||||
FFormBorderStyle:= bsSizeable;
|
FFormBorderStyle:= bsSizeable;
|
||||||
@ -2680,9 +2669,6 @@ begin
|
|||||||
if Control.CanFocus then SetActiveControl(Control);
|
if Control.CanFocus then SetActiveControl(Control);
|
||||||
end;
|
end;
|
||||||
//DebugLn('TCustomForm.Loaded ',Name,':',ClassName,' ',FormUpdating,' ',fsCreating in FFormState,' ',Visible,' ',fsVisible in FormState);
|
//DebugLn('TCustomForm.Loaded ',Name,':',ClassName,' ',FormUpdating,' ',fsCreating in FFormState,' ',Visible,' ',fsVisible in FormState);
|
||||||
if csDesigning in ComponentState then
|
|
||||||
FDesignTimePPI := Screen.PixelsPerInch;
|
|
||||||
FPixelsPerInch := FDesignTimePPI;
|
|
||||||
if fsVisible in FormState then
|
if fsVisible in FormState then
|
||||||
Visible := True;
|
Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -39,15 +39,6 @@ begin
|
|||||||
ParentForm.DoRemoveActionList(ActionList);
|
ParentForm.DoRemoveActionList(ActionList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomFrame.SetDesignTimePPI(const aDesignTimePPI: Integer);
|
|
||||||
begin
|
|
||||||
if (csLoading in ComponentState) // allow setting only when loading
|
|
||||||
or not (csDesigning in ComponentState) then // or in runtime (the programmer has to know why he is doing that)
|
|
||||||
FDesignTimePPI := aDesignTimePPI
|
|
||||||
else
|
|
||||||
raise EInvalidOperation.Create(sCannotSetDesignTimePPI);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomFrame.ReadDesignLeft(Reader: TReader);
|
procedure TCustomFrame.ReadDesignLeft(Reader: TReader);
|
||||||
var
|
var
|
||||||
Temp: LongInt;
|
Temp: LongInt;
|
||||||
@ -162,15 +153,6 @@ begin
|
|||||||
Result.CY := 240;
|
Result.CY := 240;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomFrame.Loaded;
|
|
||||||
begin
|
|
||||||
inherited Loaded;
|
|
||||||
|
|
||||||
if csDesigning in ComponentState then
|
|
||||||
FDesignTimePPI := Screen.PixelsPerInch;
|
|
||||||
FPixelsPerInch := FDesignTimePPI;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomFrame.DefineProperties(Filer: TFiler);
|
procedure TCustomFrame.DefineProperties(Filer: TFiler);
|
||||||
Var
|
Var
|
||||||
Ancestor: TComponent;
|
Ancestor: TComponent;
|
||||||
@ -202,8 +184,6 @@ begin
|
|||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, csSetCaption,
|
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, csSetCaption,
|
||||||
csDoubleClicks, csParentBackground];
|
csDoubleClicks, csParentBackground];
|
||||||
FDesignTimePPI := 96;
|
|
||||||
FPixelsPerInch := FDesignTimePPI;
|
|
||||||
if (ClassType<>TFrame) and ([csDesignInstance, csDesigning]*ComponentState=[]) then
|
if (ClassType<>TFrame) and ([csDesignInstance, csDesigning]*ComponentState=[]) then
|
||||||
begin
|
begin
|
||||||
if not InitInheritedComponent(Self, TFrame) then
|
if not InitInheritedComponent(Self, TFrame) then
|
||||||
|
|||||||
@ -370,8 +370,8 @@ msgstr "Sensible a majúsc-minúsc."
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -364,8 +364,8 @@ msgstr "Rozlišovat velká/malá"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Prvek třídy '%s' nemůže mít prvek třídy '%s' jako dítě"
|
msgstr "Prvek třídy '%s' nemůže mít prvek třídy '%s' jako dítě"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -363,8 +363,8 @@ msgstr "Schreibweisenabhängig"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -360,8 +360,8 @@ msgstr "Sensible a mayúsculas/minúsculas"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "El control de clase '%s' no puede tener al control de clase '%s' como hijo"
|
msgstr "El control de clase '%s' no puede tener al control de clase '%s' como hijo"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -360,8 +360,8 @@ msgstr "Sama kirjainkoko"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Luokan '%s' kontrollin lapsi ei voi olla luokan '%s' kontrolli"
|
msgstr "Luokan '%s' kontrollin lapsi ei voi olla luokan '%s' kontrolli"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -362,8 +362,8 @@ msgstr "Respecter la casse"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Le contrôle de la classe \"%s\" ne peut pas contenir un contrôle de la classe \"%s\" comme enfant"
|
msgstr "Le contrôle de la classe \"%s\" ne peut pas contenir un contrôle de la classe \"%s\" comme enfant"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -371,8 +371,8 @@ msgstr "רגיש לריישיות"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "פקד של המחלקה '%s' לא יכול לקבל פקד של מחלקה s% בתור בן"
|
msgstr "פקד של המחלקה '%s' לא יכול לקבל פקד של מחלקה s% בתור בן"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -362,8 +362,8 @@ msgstr "Kis-/nagybetűre érzékeny"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "'%s' osztályú vezérlőnek nem lehet gyermeke egy '%s' osztályú vezérlő"
|
msgstr "'%s' osztályú vezérlőnek nem lehet gyermeke egy '%s' osztályú vezérlő"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -371,8 +371,8 @@ msgstr "Sensitif huruf"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -364,8 +364,8 @@ msgstr "Differenzia maiuscolo e minuscolo"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Un controllo di classe '%s' non può avere figli di classe '%s'"
|
msgstr "Un controllo di classe '%s' non può avere figli di classe '%s'"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -370,8 +370,8 @@ msgstr "大文字小文字を区別"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "コントロールクラス '%s' はコントロールクラス '%s' を子とすることはできません"
|
msgstr "コントロールクラス '%s' はコントロールクラス '%s' を子とすることはできません"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -371,8 +371,8 @@ msgstr "Skirti raidžių lygį"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "„%s“ klasės valdiklis negali būti „%s“ klasės valdiklio tėvas"
|
msgstr "„%s“ klasės valdiklis negali būti „%s“ klasės valdiklio tėvas"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -371,8 +371,8 @@ msgstr "Hoofdletter gevoelig"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Control van klasse '%s' kan control van klasse '%s' niet als kind hebben"
|
msgstr "Control van klasse '%s' kan control van klasse '%s' niet als kind hebben"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -370,8 +370,8 @@ msgstr "Skill mellom store/små bokstaver"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -366,8 +366,8 @@ msgstr "Uwzględnij wielkość liter"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -355,8 +355,8 @@ msgstr ""
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -360,8 +360,8 @@ msgstr "Diferenciar maiúsc./minúsc."
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Controle de classe '%s' não pode ter controle de classe '%s' como filho"
|
msgstr "Controle de classe '%s' não pode ter controle de classe '%s' como filho"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -368,8 +368,8 @@ msgstr "Diferenciar maiúsc./minúsc."
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Controle de classe '%s' não pode ter controle de classe '%s' como filho"
|
msgstr "Controle de classe '%s' não pode ter controle de classe '%s' como filho"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -362,9 +362,9 @@ msgstr "С учётом регистра"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Элемент управления класса '%s' не может иметь дочерний элемент управления класса '%s'"
|
msgstr "Элемент управления класса '%s' не может иметь дочерний элемент управления класса '%s'"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr "Элемент управления '%s' не имеет родительской формы"
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
msgid "Control '%s' has no parent window"
|
msgid "Control '%s' has no parent window"
|
||||||
|
|||||||
@ -365,8 +365,8 @@ msgstr "Rozlišovať veľké a malé písmo"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Prvok triedy '%s' nemôže mať prvok triedy '%s' ako dieťa"
|
msgstr "Prvok triedy '%s' nemôže mať prvok triedy '%s' ako dieťa"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -370,8 +370,8 @@ msgstr "Büyük/küçük harfe duyarlı"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -371,8 +371,8 @@ msgstr "Врахування регістру"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr "Елемент управління класу '%s' не може мати наслідником елемент класу '%s'"
|
msgstr "Елемент управління класу '%s' не може мати наслідником елемент класу '%s'"
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -373,8 +373,8 @@ msgstr "大小写敏感"
|
|||||||
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
msgid "Control of class '%s' can't have control of class '%s' as a child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentform
|
#: lclstrconsts.rscontrolhasnoparentformorframe
|
||||||
msgid "Control '%s' has no parent form"
|
msgid "Control '%s' has no parent form or frame"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rscontrolhasnoparentwindow
|
#: lclstrconsts.rscontrolhasnoparentwindow
|
||||||
|
|||||||
@ -246,7 +246,7 @@ resourceString
|
|||||||
rsCreatingGdbCatchableError = 'Creating gdb catchable error:';
|
rsCreatingGdbCatchableError = 'Creating gdb catchable error:';
|
||||||
rsAControlCanNotHaveItselfAsParent = 'A control can''t have itself as a parent';
|
rsAControlCanNotHaveItselfAsParent = 'A control can''t have itself as a parent';
|
||||||
rsControlHasNoParentWindow = 'Control ''%s'' has no parent window';
|
rsControlHasNoParentWindow = 'Control ''%s'' has no parent window';
|
||||||
rsControlHasNoParentForm = 'Control ''%s'' has no parent form';
|
rsControlHasNoParentFormOrFrame = 'Control ''%s'' has no parent form or frame';
|
||||||
rsControlIsNotAParent = '''%s'' is not a parent of ''%s''';
|
rsControlIsNotAParent = '''%s'' is not a parent of ''%s''';
|
||||||
rsControlClassCantContainChildClass = 'Control of class ''%s'' can''t have control of class ''%s'' as a child';
|
rsControlClassCantContainChildClass = 'Control of class ''%s'' can''t have control of class ''%s'' as a child';
|
||||||
rsASCannotHaveAsParent = 'Class %s cannot have %s as parent.';
|
rsASCannotHaveAsParent = 'Class %s cannot have %s as parent.';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user