mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 09:39:06 +02:00
LCL: fixed maskedit warnings
git-svn-id: trunk@14799 -
This commit is contained in:
parent
09b6731e09
commit
a69cd0c485
@ -90,7 +90,7 @@ type
|
|||||||
procedure LMCutToClip(var Message: TLMessage); message LM_CUT;
|
procedure LMCutToClip(var Message: TLMessage); message LM_CUT;
|
||||||
procedure LMClearSel(var Message : TLMessage); message LM_CLEAR;
|
procedure LMClearSel(var Message : TLMessage); message LM_CLEAR;
|
||||||
function ClearChar(Position : Integer) : Char;
|
function ClearChar(Position : Integer) : Char;
|
||||||
procedure SetCursor;
|
procedure SetCursorPos;
|
||||||
function GetIsMasked : Boolean;
|
function GetIsMasked : Boolean;
|
||||||
procedure InsertChar(Ch : Char);
|
procedure InsertChar(Ch : Char);
|
||||||
procedure DeleteSelected(AlsoOnePosition : Boolean);
|
procedure DeleteSelected(AlsoOnePosition : Boolean);
|
||||||
@ -231,7 +231,7 @@ begin
|
|||||||
CurrentText[I] := ClearChar(I);
|
CurrentText[I] := ClearChar(I);
|
||||||
end;
|
end;
|
||||||
Inherited Text := CurrentText;
|
Inherited Text := CurrentText;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
Result := True;
|
Result := True;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -353,7 +353,7 @@ begin
|
|||||||
Inherited Text := S;
|
Inherited Text := S;
|
||||||
CurrentText := S;
|
CurrentText := S;
|
||||||
Inc(FPosition);
|
Inc(FPosition);
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
FPosition := 0;
|
FPosition := 0;
|
||||||
SetCharToPos;
|
SetCharToPos;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
FPosition := 0;
|
FPosition := 0;
|
||||||
SetCharToPos;
|
SetCharToPos;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -398,12 +398,11 @@ end;
|
|||||||
// Set the current Space Char
|
// Set the current Space Char
|
||||||
procedure TCustomMaskEdit.SetSpaceChar(Value : Char);
|
procedure TCustomMaskEdit.SetSpaceChar(Value : Char);
|
||||||
Var
|
Var
|
||||||
S, Old : ShortString;
|
S : ShortString;
|
||||||
I : Integer;
|
I : Integer;
|
||||||
Begin
|
Begin
|
||||||
if (Value <> FSpaceChar) And (Not IsMaskChar(Value)) then
|
if (Value <> FSpaceChar) And (Not IsMaskChar(Value)) then
|
||||||
begin
|
begin
|
||||||
Old := FSpaceChar;
|
|
||||||
FSpaceChar := Value;
|
FSpaceChar := Value;
|
||||||
|
|
||||||
if isMasked then
|
if isMasked then
|
||||||
@ -463,7 +462,7 @@ begin
|
|||||||
if Key = VK_LEFT then Dec(FPosition)
|
if Key = VK_LEFT then Dec(FPosition)
|
||||||
else Inc(FPosition);
|
else Inc(FPosition);
|
||||||
Key := 0;
|
Key := 0;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
@ -474,7 +473,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if Key = VK_HOME then FPosition := 1
|
if Key = VK_HOME then FPosition := 1
|
||||||
else FPosition := FMaxChars-1;
|
else FPosition := FMaxChars-1;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
Key := 0;
|
Key := 0;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
@ -516,7 +515,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Dec(FPosition);
|
Dec(FPosition);
|
||||||
SetSel(SelectionStart-1, SelectionStop-1);
|
SetSel(SelectionStart-1, SelectionStop-1);
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DeleteSelected(True);
|
DeleteSelected(True);
|
||||||
@ -529,7 +528,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Set the cursor position
|
// Set the cursor position
|
||||||
procedure TCustomMaskEdit.SetCursor;
|
procedure TCustomMaskEdit.SetCursorPos;
|
||||||
Var
|
Var
|
||||||
Ok : Boolean;
|
Ok : Boolean;
|
||||||
I, C : Integer;
|
I, C : Integer;
|
||||||
@ -595,7 +594,7 @@ begin
|
|||||||
inherited Text := S;
|
inherited Text := S;
|
||||||
CurrentText := S;
|
CurrentText := S;
|
||||||
FPosition := 0;
|
FPosition := 0;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -765,7 +764,7 @@ begin
|
|||||||
if IsMaskChar(FMask[I]) then Inc(A);
|
if IsMaskChar(FMask[I]) then Inc(A);
|
||||||
|
|
||||||
FPosition := A;
|
FPosition := A;
|
||||||
SetCursor;
|
SetCursorPos;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Delete selected chars
|
// Delete selected chars
|
||||||
|
Loading…
Reference in New Issue
Block a user