From 5b55b8bf054d2e1a1f39c1c72e0e824adf5465a8 Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Sat, 22 Dec 2012 14:40:18 +0000 Subject: [PATCH] win32: Invalidate conrol after setting PassWordChar, otherwise the changes do not propagate immediately. Fixes issue #0023170. git-svn-id: trunk@39621 - --- lcl/interfaces/win32/win32wsstdctrls.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index be3b5a448d..68467e9ab5 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -1223,6 +1223,8 @@ end; class procedure TWin32WSCustomEdit.SetPasswordChar(const ACustomEdit: TCustomEdit; NewChar: char); begin SendMessage(ACustomEdit.Handle, EM_SETPASSWORDCHAR, WParam(NewChar), 0); + //it does not propagate immediately to the control otherwise... + ACustomEdit.Invalidate; end; class procedure TWin32WSCustomEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);