473,406 Members | 2,954 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.

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 3059
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.