mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 10:09:29 +02:00
lcl: move interface initialization of TCustomEdit from CreateWnd to InitializeWnd. Consistent with other controls and allows interfaces to check is handle is being created
git-svn-id: trunk@36754 -
This commit is contained in:
parent
1cef794417
commit
ce12dfae54
@ -26,20 +26,6 @@ begin
|
||||
PreferredWidth:=0;
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.CreateWnd;
|
||||
begin
|
||||
inherited CreateWnd;
|
||||
TWSCustomEditClass(WidgetSetClass).SetCharCase(Self, FCharCase);
|
||||
TWSCustomEditClass(WidgetSetClass).SetEchoMode(Self, FEchoMode);
|
||||
TWSCustomEditClass(WidgetSetClass).SetMaxLength(Self, FMaxLength);
|
||||
TWSCustomEditClass(WidgetSetClass).SetPasswordChar(Self, FPasswordChar);
|
||||
TWSCustomEditClass(WidgetSetClass).SetReadOnly(Self, FReadOnly);
|
||||
TWSCustomEditClass(WidgetSetClass).SetAlignment(Self, FAlignment);
|
||||
TWSCustomEditClass(WidgetSetClass).SetCaretPos(Self, fCaretPos);
|
||||
TWSCustomEditClass(WidgetSetClass).SetSelStart(Self, FSelStart);
|
||||
TWSCustomEditClass(WidgetSetClass).SetSelLength(Self, FSelLength);
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.CreateParams(var Params: TCreateParams);
|
||||
const
|
||||
AlignmentStyle: array[TAlignment] of DWord = (
|
||||
@ -56,6 +42,20 @@ begin
|
||||
Params.Style := Params.Style or ES_NOHIDESEL;
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.InitializeWnd;
|
||||
begin
|
||||
inherited InitializeWnd;
|
||||
TWSCustomEditClass(WidgetSetClass).SetCharCase(Self, FCharCase);
|
||||
TWSCustomEditClass(WidgetSetClass).SetEchoMode(Self, FEchoMode);
|
||||
TWSCustomEditClass(WidgetSetClass).SetMaxLength(Self, FMaxLength);
|
||||
TWSCustomEditClass(WidgetSetClass).SetPasswordChar(Self, FPasswordChar);
|
||||
TWSCustomEditClass(WidgetSetClass).SetReadOnly(Self, FReadOnly);
|
||||
TWSCustomEditClass(WidgetSetClass).SetAlignment(Self, FAlignment);
|
||||
TWSCustomEditClass(WidgetSetClass).SetCaretPos(Self, fCaretPos);
|
||||
TWSCustomEditClass(WidgetSetClass).SetSelStart(Self, FSelStart);
|
||||
TWSCustomEditClass(WidgetSetClass).SetSelLength(Self, FSelLength);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomEdit.Create
|
||||
Params: none
|
||||
|
@ -716,8 +716,8 @@ type
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure TextChanged; override;
|
||||
procedure Change; virtual;
|
||||
procedure DoEnter; override;
|
||||
|
Loading…
Reference in New Issue
Block a user