472,986 Members | 3,019 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

propertygrid utilization

How can I set the browsableattributes of the control that has been selected
(selectedobject) by the propertygrid?

Here's what I'm after - I want to open a form with a propertygrid in it.
The selectedobject will be the form itself. I want the user to change
certain properties, thus changing the form. This works fine, but what I
really want is to take the changes and lock them into a config file, such
that this pc will then display all forms with these attributes.

I don't want the user to be able to change everything - for example, I don't
want a standard form size, nor a standard cursor, but I do want the user to
be able to select the font, font size, form backcolor, etc. So I have to be
able to include only certain properties in the propertygrid. Then of course
I need to trap the selected values and lock them into global variables, them
rebuild the config file to reflect this (when the use selects and 'update'
button).

Thanks for any help with all of this.

Bernie Yaeger
Nov 20 '05 #1
4 3034
Cor
Hi Bernie,

I think you are on the border where to take the registry or a config.file.

Where you are talking about are runtime properties, maybe you can save them
also at the end in your config. But I think this is real the registry.

The registry is very easy to use in VB.net

I would not take the registry property because you only want to change the
properties the user can use, you can that make as nice as you want using a
trackbar and things like that I think.

But I asume you know that already.

Cor
How can I set the browsableattributes of the control that has been selected (selectedobject) by the propertygrid?

Here's what I'm after - I want to open a form with a propertygrid in it.
The selectedobject will be the form itself. I want the user to change
certain properties, thus changing the form. This works fine, but what I
really want is to take the changes and lock them into a config file, such
that this pc will then display all forms with these attributes.

I don't want the user to be able to change everything - for example, I don't want a standard form size, nor a standard cursor, but I do want the user to be able to select the font, font size, form backcolor, etc. So I have to be able to include only certain properties in the propertygrid. Then of course I need to trap the selected values and lock them into global variables, them rebuild the config file to reflect this (when the use selects and 'update'
button).

Thanks for any help with all of this.

Bernie Yaeger

Nov 20 '05 #2
Bernie,
In addition to Cor's comments.

I don't have a specific example, have you considered using a proxy object?

Instead of passing the Form or Control itself to the PropertyGrid, pass your
own object to the PropertyGrid.

Your proxy object would need to implement the
System.ComponentModel.ICustomTypeDescriptor to limit the properties that are
displayed by the Property Grid. System.ComponentModel.TypeDescriptor has a
number of useful helper functions that your implementation of
ICustomTypeDescriptor could use.

For details on the property grid see:

http://msdn.microsoft.com/library/de...ngpropgrid.asp

http://msdn.microsoft.com/library/de...etpropbrow.asp

Hope this helps
Jay

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:O6*************@TK2MSFTNGP11.phx.gbl...
How can I set the browsableattributes of the control that has been selected (selectedobject) by the propertygrid?

Here's what I'm after - I want to open a form with a propertygrid in it.
The selectedobject will be the form itself. I want the user to change
certain properties, thus changing the form. This works fine, but what I
really want is to take the changes and lock them into a config file, such
that this pc will then display all forms with these attributes.

I don't want the user to be able to change everything - for example, I don't want a standard form size, nor a standard cursor, but I do want the user to be able to select the font, font size, form backcolor, etc. So I have to be able to include only certain properties in the propertygrid. Then of course I need to trap the selected values and lock them into global variables, them rebuild the config file to reflect this (when the use selects and 'update'
button).

Thanks for any help with all of this.

Bernie Yaeger

Nov 20 '05 #3
Hi Jay,

The links you provided - especially the first - really get me going in the
right direction. He's doing almost exactly what I'm looking for.

Tx,

Bernie

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl...
Bernie,
In addition to Cor's comments.

I don't have a specific example, have you considered using a proxy object?

Instead of passing the Form or Control itself to the PropertyGrid, pass your own object to the PropertyGrid.

Your proxy object would need to implement the
System.ComponentModel.ICustomTypeDescriptor to limit the properties that are displayed by the Property Grid. System.ComponentModel.TypeDescriptor has a
number of useful helper functions that your implementation of
ICustomTypeDescriptor could use.

For details on the property grid see:

http://msdn.microsoft.com/library/de...ngpropgrid.asp
http://msdn.microsoft.com/library/de...etpropbrow.asp
Hope this helps
Jay

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:O6*************@TK2MSFTNGP11.phx.gbl...
How can I set the browsableattributes of the control that has been selected
(selectedobject) by the propertygrid?

Here's what I'm after - I want to open a form with a propertygrid in it.
The selectedobject will be the form itself. I want the user to change
certain properties, thus changing the form. This works fine, but what I
really want is to take the changes and lock them into a config file, such that this pc will then display all forms with these attributes.

I don't want the user to be able to change everything - for example, I

don't
want a standard form size, nor a standard cursor, but I do want the user

to
be able to select the font, font size, form backcolor, etc. So I have to be
able to include only certain properties in the propertygrid. Then of

course
I need to trap the selected values and lock them into global variables,

them
rebuild the config file to reflect this (when the use selects and

'update' button).

Thanks for any help with all of this.

Bernie Yaeger


Nov 20 '05 #4
Hi Cor,

You are of course correct - the registry is where I intend to place these
settings.

Thanks for your help.

Bernie

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Bernie,

I think you are on the border where to take the registry or a config.file.

Where you are talking about are runtime properties, maybe you can save them also at the end in your config. But I think this is real the registry.

The registry is very easy to use in VB.net

I would not take the registry property because you only want to change the
properties the user can use, you can that make as nice as you want using a
trackbar and things like that I think.

But I asume you know that already.

Cor
How can I set the browsableattributes of the control that has been selected
(selectedobject) by the propertygrid?

Here's what I'm after - I want to open a form with a propertygrid in it.
The selectedobject will be the form itself. I want the user to change
certain properties, thus changing the form. This works fine, but what I
really want is to take the changes and lock them into a config file, such that this pc will then display all forms with these attributes.

I don't want the user to be able to change everything - for example, I

don't
want a standard form size, nor a standard cursor, but I do want the user

to
be able to select the font, font size, form backcolor, etc. So I have to be
able to include only certain properties in the propertygrid. Then of

course
I need to trap the selected values and lock them into global variables,

them
rebuild the config file to reflect this (when the use selects and

'update' button).

Thanks for any help with all of this.

Bernie Yaeger


Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Terry | last post by:
I have a very basic program, but for some reason I can't get it to behave properly. What I want is a basic form with a TabControl that fills the entire form. The tab control should have 4 tabs...
3
by: Dave Girvitz | last post by:
I have a PropertyGrid (Windows Forms App) based component that uses TypeConverters to generate ranges of acceptable values for properties. The idea was that I could download the key/value pairs...
1
by: ANDRES BECERRA | last post by:
Herfried K. Wagner was kind enough to point me to the PropertyGrid control http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformspropertygridclasstopic.asp I have found a few...
7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
5
by: Sharon | last post by:
I'm using the PropertyGrid control, and I want it to show a button. But I set the PropertyGrid.SelectedObject with a object that as a Button property, the PropertyGrid shows the buttons properties,...
4
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so...
3
by: =?Utf-8?B?U3RldmVU?= | last post by:
Is it possible to hide a row within a PropertyGrid based upon the boolean value of another row within the PropertyGrid? I am using VS2005 with .NET Frameworks 2.0. -- ----------- Thanks,...
1
by: Kaheru | last post by:
memory utilization increase? This is because when i try to keep track of the CPU utilization and memory utilization of my FTP server process (ftpserver.exe), the CPU utilization increase, but the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.