By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,068 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,068 IT Pros & Developers. It's quick & easy.

How to add Textbox's PasswordChar property in PropertyGrid Control

P: n/a
Hi Friends

I want to add PasswordChar Property which shows ****** for string which I
type in PropertyGrid Control.

Regards,
Siddharth
Nov 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you mean you
want to use the dataGrid and want the PasswordChar properties to apply to
that ?

Please explain in more clarity.

Regards - OHM
siddhiash wrote:
Hi Friends

I want to add PasswordChar Property which shows ****** for string
which I type in PropertyGrid Control.

Regards,
Siddharth

Nov 20 '05 #2

P: n/a
Hi

There is PropertyGrid Control in VB.NET like normal property window (it is
same one). In an my application i use propertygrid control to accept
databasename, servername, password. Password property I want as **** while
typing so that it is not visible.

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@sparta.btinternet.com...
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you mean you want to use the dataGrid and want the PasswordChar properties to apply to
that ?

Please explain in more clarity.

Regards - OHM
siddhiash wrote:
Hi Friends

I want to add PasswordChar Property which shows ****** for string
which I type in PropertyGrid Control.

Regards,
Siddharth


Nov 20 '05 #3

P: n/a
Sorry, now I understand what you are trying to do. The selectObject property
is needed to be set to the object that you want to be able to set properties
for. With the textBox, there is a passwordChr as you suggest. This would
then appear in the propertyGrid.

Are you asking how to set up a similar property on a different type of
object ?

OHM
siddhiash wrote:
Hi

There is PropertyGrid Control in VB.NET like normal property window
(it is same one). In an my application i use propertygrid control to
accept databasename, servername, password. Password property I want
as **** while typing so that it is not visible.

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@sparta.btinternet.com...
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you
mean you want to use the dataGrid and want the PasswordChar
properties to apply to that ?

Please explain in more clarity.

Regards - OHM
siddhiash wrote:
Hi Friends

I want to add PasswordChar Property which shows ****** for string
which I type in PropertyGrid Control.

Regards,
Siddharth

Nov 20 '05 #4

P: n/a
What you understood is right.
I want to set password field in one object same like what works in TextBox
when we set it PasswordChar = *

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@hercules.btinternet.com...
Sorry, now I understand what you are trying to do. The selectObject property is needed to be set to the object that you want to be able to set properties for. With the textBox, there is a passwordChr as you suggest. This would
then appear in the propertyGrid.

Are you asking how to set up a similar property on a different type of
object ?

OHM
siddhiash wrote:
Hi

There is PropertyGrid Control in VB.NET like normal property window
(it is same one). In an my application i use propertygrid control to
accept databasename, servername, password. Password property I want
as **** while typing so that it is not visible.

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@sparta.btinternet.com...
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you
mean you want to use the dataGrid and want the PasswordChar
properties to apply to that ?

Please explain in more clarity.

Regards - OHM
siddhiash wrote:
Hi Friends

I want to add PasswordChar Property which shows ****** for string
which I type in PropertyGrid Control.

Regards,
Siddharth


Nov 20 '05 #5

P: n/a
OK. Now let me further understand. We have an class like so. . . . . .

Public Class MyObject

Dim p As String

Public Property pwd() As String
Get
Return p
End Get
Set(ByVal Value As String)
p = Value

End Set
End Property

End Class
'//Now we instantiate an instance of MyObject
Dim oMyObject = New MyObject

'//Now set the PropertyGrid to look at oMyObject . . .
PropertyGrid1.Text = "Property Grid"
PropertyGrid1.SelectedObject = oMyObject

Now we will see Pwd appear in the property grid and we can set it by typing
in the characters right.

OK, what you want to do is to replace the characters that you type into the
PropertyGrid itself with a character like '*'

Do I read you correctly ?, if so the only way I can think to do this is to
trap the keydown event of the PropertyGrid and do some clever work here.
When you set this property for a textBox, the textbox class replaces the
visible characters for an '*' or whatever you set it to. If you wanted to
do this for another control like a PropertyGrid ( which does not support
this method [ to my knowledge ] ) you would have to write a wrapper, and
handle it this way.

If someon else is reading this and knows of another way, please butt in and
help.
Regards - OHM



siddhiash wrote:
What you understood is right.
I want to set password field in one object same like what works in
TextBox when we set it PasswordChar = *

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@hercules.btinternet.com...
Sorry, now I understand what you are trying to do. The selectObject
property is needed to be set to the object that you want to be able
to set properties for. With the textBox, there is a passwordChr as
you suggest. This would then appear in the propertyGrid.

Are you asking how to set up a similar property on a different type
of object ?

OHM
siddhiash wrote:
Hi

There is PropertyGrid Control in VB.NET like normal property window
(it is same one). In an my application i use propertygrid control to
accept databasename, servername, password. Password property I want
as **** while typing so that it is not visible.

Regards,
Siddharth
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bq**********@sparta.btinternet.com...
What do you mean by PropertyGrid Control, I have not see this, (
i'm probably missing it while its staring me in the face ! ). Or
do you mean you want to use the dataGrid and want the PasswordChar
properties to apply to that ?

Please explain in more clarity.

Regards - OHM
siddhiash wrote:
> Hi Friends
>
> I want to add PasswordChar Property which shows ****** for string
> which I type in PropertyGrid Control.
>
> Regards,
> Siddharth

Nov 20 '05 #6

P: n/a
* "One Handed Man" <Bo****@Duck.net> scripsit:
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you mean you
want to use the dataGrid and want the PasswordChar properties to apply to
that ?


'System.Windows.Forms.PropertyGrid' -- The control VS.NET uses in the
properties window.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

P: n/a
Yes, we see that

Herfried K. Wagner [MVP] wrote:
* "One Handed Man" <Bo****@Duck.net> scripsit:
What do you mean by PropertyGrid Control, I have not see this, ( i'm
probably missing it while its staring me in the face ! ). Or do you
mean you want to use the dataGrid and want the PasswordChar
properties to apply to that ?


'System.Windows.Forms.PropertyGrid' -- The control VS.NET uses in the
properties window.

Nov 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.