lcl: change TCustomMaskEdit.EditMask to protected. Issue #20790

git-svn-id: trunk@33899 -
This commit is contained in:
blikblum 2011-12-01 21:36:28 +00:00
parent 4a0c93d51e
commit dbccbd3689
2 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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