mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 18:40:52 +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;
|
end;
|
||||||
|
|
||||||
{ TMaskEditEditor }
|
{ TMaskEditEditor }
|
||||||
|
TCustomMaskEditAccess = class(TCustomMaskEdit)
|
||||||
|
end; //Hack to get access to EditMask
|
||||||
|
|
||||||
TMaskEditEditor = class(TDefaultComponentEditor)
|
TMaskEditEditor = class(TDefaultComponentEditor)
|
||||||
public
|
public
|
||||||
procedure ExecuteVerb(Index: Integer); override;
|
procedure ExecuteVerb(Index: Integer); override;
|
||||||
function GetVerb(Index: Integer): string; override;
|
function GetVerb(Index: Integer): string; override;
|
||||||
function GetVerbCount: Integer; override;
|
function GetVerbCount: Integer; override;
|
||||||
function MaskEdit: TCustomMaskEdit; virtual;
|
function MaskEdit: TCustomMaskEditAccess; virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -376,9 +378,9 @@ begin
|
|||||||
Result := 1;
|
Result := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMaskEditEditor.MaskEdit: TCustomMaskEdit;
|
function TMaskEditEditor.MaskEdit: TCustomMaskEditAccess;
|
||||||
begin
|
begin
|
||||||
Result := TCustomMaskEdit(GetComponent)
|
Result := TCustomMaskEditAccess(GetComponent)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -201,7 +201,7 @@ type
|
|||||||
Function MaskToChar(Value : tMaskedType) : Char;
|
Function MaskToChar(Value : tMaskedType) : Char;
|
||||||
Function IsMaskChar(Ch : Char) : Boolean;
|
Function IsMaskChar(Ch : Char) : Boolean;
|
||||||
Function IsLiteral(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 CharMatchesMask(const Ch: Char; const Position: Integer): Boolean;
|
||||||
function ClearChar(Position : Integer) : Char;
|
function ClearChar(Position : Integer) : Char;
|
||||||
|
|
||||||
@ -244,6 +244,7 @@ type
|
|||||||
property SpaceChar: Char read FSpaceChar write SetSpaceChar;
|
property SpaceChar: Char read FSpaceChar write SetSpaceChar;
|
||||||
property MaxLength: Integer read GetMaxLength write SetMaxLength;
|
property MaxLength: Integer read GetMaxLength write SetMaxLength;
|
||||||
property CharCase: TEditCharCase read GetCharCase write SetCharCase;
|
property CharCase: TEditCharCase read GetCharCase write SetCharCase;
|
||||||
|
property EditMask: string read FRealMask write SetMask;
|
||||||
public
|
public
|
||||||
procedure CutToClipBoard; override;
|
procedure CutToClipBoard; override;
|
||||||
procedure PasteFromClipBoard; override;
|
procedure PasteFromClipBoard; override;
|
||||||
@ -251,7 +252,6 @@ type
|
|||||||
constructor Create(Aowner : TComponent); override;
|
constructor Create(Aowner : TComponent); override;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure ValidateEdit; virtual;
|
procedure ValidateEdit; virtual;
|
||||||
property EditMask: string read FRealMask write SetMask;
|
|
||||||
property Text: TCaption read GetText write SetText;
|
property Text: TCaption read GetText write SetText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -848,7 +848,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
//Return if Value matches the EditMask
|
//Return if Value matches the EditMask
|
||||||
function TCustomMaskEdit.TextIsValid(Value: String): Boolean;
|
function TCustomMaskEdit.TextIsValid(const Value: String): Boolean;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user