diff --git a/lcl/include/customedit.inc b/lcl/include/customedit.inc index de0a84dc1b..e2e30222f0 100644 --- a/lcl/include/customedit.inc +++ b/lcl/include/customedit.inc @@ -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; diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index f448cee774..e6acf6c8de 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -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);