win32 interface: implemented TEdit.EchoMode=emNone as PassWordChar=#32 (bug #7705)

git-svn-id: trunk@10268 -
This commit is contained in:
vincents 2006-12-01 08:09:49 +00:00
parent 70ac84f4fb
commit a4f24ffb45
2 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,8 @@ procedure TCustomEdit.SetPasswordChar(const AValue: Char);
begin
if FPasswordChar=AValue then exit;
FPasswordChar:=AValue;
if FPasswordChar=#0 then
EchoMode:=emNormal;
if HandleAllocated then
TWSCustomEditClass(WidgetSetClass).SetPasswordChar(Self, AValue);
end;

View File

@ -858,7 +858,10 @@ begin
end;
class procedure TWin32WSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
const
PassWordChar : array[TEchoMode] of char = (#0, ' ','*');
begin
ACustomEdit.PasswordChar := PassWordChar[NewMode];
end;
class procedure TWin32WSCustomEdit.SetMaxLength(const ACustomEdit: TCustomEdit; NewLength: integer);