mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-11 18:59:47 +01:00
lcl: use TCaption in MaskEdit for fields and methods related to Text property
git-svn-id: trunk@35363 -
This commit is contained in:
parent
4323c55273
commit
6a782e1d1b
@ -172,7 +172,7 @@ type
|
|||||||
FMaskSave : Boolean; // Save mask as part of the data
|
FMaskSave : Boolean; // Save mask as part of the data
|
||||||
FTrimType : TMaskEditTrimType; // Trim leading or trailing spaces in GetText
|
FTrimType : TMaskEditTrimType; // Trim leading or trailing spaces in GetText
|
||||||
FSpaceChar : Char; // Char for space (default '_')
|
FSpaceChar : Char; // Char for space (default '_')
|
||||||
FCurrentText : String; // FCurrentText is our backup. See notes above!
|
FCurrentText : TCaption; // FCurrentText is our backup. See notes above!
|
||||||
FTextOnEnter : String; // Text when user enters the control, used for Reset()
|
FTextOnEnter : String; // Text when user enters the control, used for Reset()
|
||||||
FCursorPos : Integer; // Current caret position
|
FCursorPos : Integer; // Current caret position
|
||||||
FChangeAllowed: Boolean; // We do not allow text changes by the OS (cut/clear via context menu)
|
FChangeAllowed: Boolean; // We do not allow text changes by the OS (cut/clear via context menu)
|
||||||
@ -205,7 +205,7 @@ type
|
|||||||
function CharMatchesMask(const Ch: Char; const Position: Integer): Boolean;
|
function CharMatchesMask(const Ch: Char; const Position: Integer): Boolean;
|
||||||
function ClearChar(Position : Integer) : Char;
|
function ClearChar(Position : Integer) : Char;
|
||||||
|
|
||||||
procedure SetInheritedText(const Value: String); //See notes above!
|
procedure SetInheritedText(const Value: TCaption); //See notes above!
|
||||||
procedure InsertChar(Ch : Char);
|
procedure InsertChar(Ch : Char);
|
||||||
Function CanInsertChar(Position : Integer; Var Ch : Char) : Boolean;
|
Function CanInsertChar(Position : Integer; Var Ch : Char) : Boolean;
|
||||||
procedure DeleteSelected;
|
procedure DeleteSelected;
|
||||||
@ -215,7 +215,7 @@ type
|
|||||||
function RestoreMask(const NewText: String): Boolean;
|
function RestoreMask(const NewText: String): Boolean;
|
||||||
|
|
||||||
Function GetText : TCaption;
|
Function GetText : TCaption;
|
||||||
Procedure SetText(Value : TCaption);
|
Procedure SetText(Value: TCaption);
|
||||||
function GetEditText: string; virtual;
|
function GetEditText: string; virtual;
|
||||||
procedure SetEditText(const AValue: string);
|
procedure SetEditText(const AValue: string);
|
||||||
procedure TextChanged; override;
|
procedure TextChanged; override;
|
||||||
@ -912,7 +912,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
//Set text in the control with FChangeAllowed flag set appropriately
|
//Set text in the control with FChangeAllowed flag set appropriately
|
||||||
procedure TCustomMaskEdit.SetInheritedText(const Value: String);
|
procedure TCustomMaskEdit.SetInheritedText(const Value: TCaption);
|
||||||
begin
|
begin
|
||||||
if (Value <> Inherited Text) then
|
if (Value <> Inherited Text) then
|
||||||
begin
|
begin
|
||||||
@ -1189,7 +1189,7 @@ End;
|
|||||||
|
|
||||||
|
|
||||||
// Set the actual Text
|
// Set the actual Text
|
||||||
Procedure TCustomMaskEdit.SetText(Value : TCaption);
|
Procedure TCustomMaskEdit.SetText(Value: TCaption);
|
||||||
{ This tries to mimic Delphi behaviour (D3):
|
{ This tries to mimic Delphi behaviour (D3):
|
||||||
- if mask contains no literals text is set, if necessary padded with blanks,
|
- if mask contains no literals text is set, if necessary padded with blanks,
|
||||||
LTR or RTL depending on FTrimType
|
LTR or RTL depending on FTrimType
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user