mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
lcl: groupededit: use RealGetText/RealSetText overriden methods instead of new GetText/SetText to make use of TControl.Text property.
git-svn-id: trunk@52147 -
This commit is contained in:
parent
87c63ee431
commit
190e5160f3
@ -99,10 +99,10 @@ begin
|
||||
FInitialValue := GetValue;
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEditEx.GetText: TCaption;
|
||||
function TCustomFloatSpinEditEx.RealGetText: TCaption;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
Result := inherited GetText
|
||||
Result := inherited RealGetText
|
||||
else
|
||||
Result := ValueToStr(FValue);
|
||||
end;
|
||||
|
@ -118,7 +118,7 @@ type
|
||||
protected
|
||||
function GetBuddyClassType: TControlClass; override;
|
||||
procedure DoEnter; override;
|
||||
function GetText: TCaption; override;
|
||||
function RealGetText: TCaption; override;
|
||||
procedure Reset; override;
|
||||
procedure EditChange; override;
|
||||
procedure EditKeyDown(var Key: word; Shift: TShiftState); override;
|
||||
|
@ -568,7 +568,7 @@ type
|
||||
procedure ButtonClick; override;
|
||||
procedure EditDblClick; override;
|
||||
procedure SetDirectInput(AValue: Boolean); override;
|
||||
procedure SetText(AValue: TCaption); override;
|
||||
procedure RealSetText(const AValue: TCaption); override;
|
||||
procedure SetDateMask; virtual;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -1619,7 +1619,7 @@ begin
|
||||
SetDate(FDate);
|
||||
end;
|
||||
|
||||
procedure TDateEdit.SetText(AValue: TCaption);
|
||||
procedure TDateEdit.RealSetText(const AValue: TCaption);
|
||||
begin
|
||||
if (not DirectInput) and not FUpdatingDate then
|
||||
begin
|
||||
@ -1629,9 +1629,9 @@ begin
|
||||
FDate := TextToDate(AValue, SysUtils.Date)
|
||||
else
|
||||
FDate := TextToDate(AValue, NullDate);
|
||||
AValue := DateToText(FDate);
|
||||
end;
|
||||
inherited SetText(AValue);
|
||||
inherited RealSetText(DateToText(FDate));
|
||||
end else
|
||||
inherited RealSetText(AValue);
|
||||
end;
|
||||
|
||||
procedure TDateEdit.SetDateMask;
|
||||
|
@ -188,8 +188,8 @@ type
|
||||
function GetBuddyClassType: TControlClass; virtual; abstract;
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure SetDirectInput(AValue: Boolean); virtual;
|
||||
function GetText: TCaption; virtual;
|
||||
procedure SetText(AValue: TCaption); virtual;
|
||||
function RealGetText: TCaption; override;
|
||||
procedure RealSetText(const AValue: TCaption); override;
|
||||
|
||||
function GetEditPopupMenu: TPopupMenu;
|
||||
function GetBuddyCaption: TCaption;
|
||||
@ -299,7 +299,7 @@ type
|
||||
property SelStart: Integer read GetSelStart write SetSelStart;
|
||||
property SelText: String read GetSelText write SetSelText;
|
||||
property TabStop: Boolean read GetTabStop write SetTabStop default True;
|
||||
property Text: TCaption read GetText write SetText;
|
||||
property Text;
|
||||
property TextHint: TTranslateString read GetTextHint write SetTextHint;
|
||||
property TextHintFontColor: TColor read GetTextHintFontColor write SetTextHintFontColor default clGrayText;
|
||||
property TextHintFontStyle: TFontStyles read GetTextHintFontStyle write SetTextHintFontStyle default [fsItalic];
|
||||
@ -622,7 +622,7 @@ begin
|
||||
Result := inherited TabStop;
|
||||
end;
|
||||
|
||||
function TCustomAbstractGroupedEdit.GetText: TCaption;
|
||||
function TCustomAbstractGroupedEdit.RealGetText: TCaption;
|
||||
begin
|
||||
Result := FEdit.Text;
|
||||
end;
|
||||
@ -903,7 +903,7 @@ begin
|
||||
FEdit.PopupMenu := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomAbstractGroupedEdit.SetText(AValue: TCaption);
|
||||
procedure TCustomAbstractGroupedEdit.RealSetText(const AValue: TCaption);
|
||||
begin
|
||||
FEdit.Text := AValue;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user