Hi!
What can prevent a TcxTextEdit from masking plaintext with asterisks when a password mode is used?
I have a TcxTreeList with two columns, name and value. The value column doesn't have any pre-defined property class, instead it gets dynamically (via OnGetEditingProperties and OnGetEditProperties, both using the same event handler) assigned a Properties item from the repository. This properties item defined TcxTextEditProperties with EchoMode=eemPassword and PasswordChar=* (and no other settings, as verified by checking the DFM). When the editor is inactive, I do indeed get asterisks in place of the plaintext displayed, and if I change the PasswordChar to "x", the display does change - indicating that I am correctly assigning the Properties object in OnGetEditProperties. But when I try to edit the value, the plaintext is shown. The same Properties object is assigned in OnGetEditingProperties, but the PasswordChar and EchoMode don't seem to be having any effect.
A test project I just created behaves as I would expect in both display and edit mode. Note that I am almost certain that in an older version of my application the password masking was working correctly, so it's likely I have accidentally turned some option off which prevents the password mode from working. Unfortunately, I no longer have that older source code :-(
Thanks for any suggestions.
Hello Josef,
I am afraid that I cannot say why this happens without examining a sample project. At first glance, it looks like something is wrong with the events. Would you please provide us with a sample project, so we can examine it on our side and find an appropriate solution?
Since posting the question I am trying to figure out how to do it in such a way that the functionality would remain and irrelevant clutter would disappear. If you don't need a runnable source, I can perhaps remove the irrelevant parts, keeping events intact.
OK, I succeeded. It turns out that even if I remove all non-essential parts and replace calculated stuff with constants, I am still getting the error. The project is attached - works on Delphi XE2 and DevExpress VCL 13.1.3. (I know that is an old version, but I am afraid to upgrade; that will happen when we need to move to XE6 later this year.)
Even more minimal version. Still shows the problem (in the second column, this time on both nodes because I use the same editor for both - the previous version used different editors for different items, to accentuate the real-time assignments).
Please try setting the <TreeList>.OptionsBehavior.EditAutoHeight property to eahNone. Does it solve the problem?
Yes, it does! Now that's a strange dependency!
The question remains, what do do? I need eahRow - or at least a way to increase the height of nodes with cxMemo inside them.
Never mind, seems that my Memo's started working even with eahNone, though I needed that in my older code. So it would seem that not using EditAutoHeight will solve all my issues.
Still, I can't help but wonder - why on Earth should EditAutoHeight influence the display of password-masking characters??
I believe it should not affect EchoMode. I have asked you to test the <TreeList>.OptionsBehavior.EditAutoHeight property to help you ASAP and I am happy to hear that this property helped. Now I am forwarding this ticket to our developers for research.