473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to add Textbox's PasswordChar property in PropertyGrid Control

Hi Friends

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

Regards,
Siddharth
Nov 20 '05 #1
7 9693
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
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
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
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
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
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jim Heavey | last post by:
I want to write a routine which will list all of the propetries and all property names for a particular object, say a DataColumn. I there a way for me to do this without manually looking up each...
3
by: rosty | last post by:
This is taken from MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html /frlrfsystemwindowsformstextboxclasspasswordchartopic.asp) "When the PasswordChar property is...
9
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox? Or can I use for mask input some other control?
1
by: Alexander | last post by:
I am building a little unique dialog editor and have derived some new classes like DButton, DLabel and DTextBox. The user adds these Controls to a panel which is part of a class Document which is...
1
by: Emaga75 | last post by:
In dotNET windows_based deployment project user interface form, How to mask a textbox for input password? Thanks.
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
5
by: Ger | last post by:
The propertygrid is a great control, but I would like to show a more descriptive text for the properties in the control. I tried to find a solution within the system.componentmodel but did not...
1
by: --== Alain ==-- | last post by:
Hi, I have a huge problem... My property does not appear in the "propertyGrid" of "test Container", when i test my custom control. Here is the custom control code : namespace...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.