mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 20:18:34 +02:00
lcl: change TCustomMaskEdit.EditMask to protected. Issue #20790
git-svn-id: trunk@33899 -
This commit is contained in:
parent
4a0c93d51e
commit
dbccbd3689
@ -76,13 +76,15 @@ type
|
||||
end;
|
||||
|
||||
{ TMaskEditEditor }
|
||||
TCustomMaskEditAccess = class(TCustomMaskEdit)
|
||||
end; //Hack to get access to EditMask
|
||||
|
||||
TMaskEditEditor = class(TDefaultComponentEditor)
|
||||
public
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
function MaskEdit: TCustomMaskEdit; virtual;
|
||||
function MaskEdit: TCustomMaskEditAccess; virtual;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -376,9 +378,9 @@ begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
function TMaskEditEditor.MaskEdit: TCustomMaskEdit;
|
||||
function TMaskEditEditor.MaskEdit: TCustomMaskEditAccess;
|
||||
begin
|
||||
Result := TCustomMaskEdit(GetComponent)
|
||||
Result := TCustomMaskEditAccess(GetComponent)
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -201,7 +201,7 @@ type
|
||||
Function MaskToChar(Value : tMaskedType) : Char;
|
||||
Function IsMaskChar(Ch : Char) : Boolean;
|
||||
Function IsLiteral(Ch: Char): Boolean;
|
||||
function TextIsValid(Value: String): Boolean;
|
||||
function TextIsValid(const Value: String): Boolean;
|
||||
function CharMatchesMask(const Ch: Char; const Position: Integer): Boolean;
|
||||
function ClearChar(Position : Integer) : Char;
|
||||
|
||||
@ -244,6 +244,7 @@ type
|
||||
property SpaceChar: Char read FSpaceChar write SetSpaceChar;
|
||||
property MaxLength: Integer read GetMaxLength write SetMaxLength;
|
||||
property CharCase: TEditCharCase read GetCharCase write SetCharCase;
|
||||
property EditMask: string read FRealMask write SetMask;
|
||||
public
|
||||
procedure CutToClipBoard; override;
|
||||
procedure PasteFromClipBoard; override;
|
||||
@ -251,7 +252,6 @@ type
|
||||
constructor Create(Aowner : TComponent); override;
|
||||
procedure Clear;
|
||||
procedure ValidateEdit; virtual;
|
||||
property EditMask: string read FRealMask write SetMask;
|
||||
property Text: TCaption read GetText write SetText;
|
||||
end;
|
||||
|
||||
@ -848,7 +848,7 @@ end;
|
||||
|
||||
|
||||
//Return if Value matches the EditMask
|
||||
function TCustomMaskEdit.TextIsValid(Value: String): Boolean;
|
||||
function TCustomMaskEdit.TextIsValid(const Value: String): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user