Password in a Propertygrid
-
Hi All, Probably a stupid qustion ;) but... I've got an object that I'm displaying to the end user via a PropertyGrid control. One of the properties is a Password. I'd like to display this item as "*****" rather than visible text. Is there anyway of doing this ? Cheers .. Andy
-
Hi All, Probably a stupid qustion ;) but... I've got an object that I'm displaying to the end user via a PropertyGrid control. One of the properties is a Password. I'd like to display this item as "*****" rather than visible text. Is there anyway of doing this ? Cheers .. Andy
-
Thanks for the info ... but the link doesn't work for me...
-
Thanks for the info ... but the link doesn't work for me...
Well i've managed to find the info and i've tried it out. The examples i can find give me the ability to render a UI component as a drop down or modal control. I've played with this and have been able to get a TextBox with a password mask just fine. BUT ... the data in the PropertyGrid is still clear text ! Which is not what i want... this is the text that must be hidden. Ideas anyone ?
-
Well i've managed to find the info and i've tried it out. The examples i can find give me the ability to render a UI component as a drop down or modal control. I've played with this and have been able to get a TextBox with a password mask just fine. BUT ... the data in the PropertyGrid is still clear text ! Which is not what i want... this is the text that must be hidden. Ideas anyone ?
-
I think you need a type convertor , not a UItype editor. Also the password have to be a class of its own (perhaps, maybe not) and not just a string. Hope this helps :) "There are no stupid question's, just stupid people."
Well, in the normal way, the property can be edited in a textbox, right? So, we can change its default UITypeEditor to a TextBox which PasswordChar is * or any char you like, by setting some attributes like EditorAttribute on the property you have. Hope helps to you.:cool: I'm amumu, and you?