all groups > dotnet windows forms > february 2004 >
You're in the

dotnet windows forms

group:

How To: Display objects in a PropertyGrid DropDown list?


Re: How To: Display objects in a PropertyGrid DropDown list? Frank Hileman
2/27/2004 4:30:28 PM
dotnet windows forms:
Hello Steve,

You need a custom UITypeEditor, that overrides GetEditStyle, and returns
UITypeEditorEditStyle.DropDown. Then you override EditValue, and have that
function create a custom form of your own creation. Be sure to use a
PropertyDescriptor (via TypeDescriptor) to change the final property, so you
get a designer transaction, and the OnComponentChanging/OnComponentChanged
functions are called automatically for your property.

Look for articles by Shawn Burke, especially the one with "RAD" in the
title, for more info on the property grid.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated VS.net graphics editor

[quoted text, click to view]

How To: Display objects in a PropertyGrid DropDown list? Steve
2/27/2004 6:04:16 PM
I followed the MSDN example that uses a StringConverter to display states
(like Ohio, Florida,) in a PropertyGrid using a DropDown list. This works
fine for strings, but I would like to do this with objects I create on the
fly.

I think I have to create a custom TypeConverter, but I'm not sure how. Any
examples would be helpful.

Thanks,

Steve

Re: How To: Display objects in a PropertyGrid DropDown list? hirf-spam-me-here NO[at]SPAM gmx.at
2/28/2004 1:54:36 AM
Frank,

* "Frank Hileman" <frankhil@no.spamming.prodigesoftware.com> scripsit:
[quoted text, click to view]

A very interesting article on the PropertyGrid can be found here:

<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/usingpropgrid.asp>

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Any good books covering the PropertyGrid? Any other links? SVD
2/29/2004 4:33:24 AM
With coded examples?

Thanks,

Steve

Re: Any good books covering the PropertyGrid? Any other links? Joerg Jooss
2/29/2004 1:25:59 PM
[quoted text, click to view]

No book, but a nice article on MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/usingpropgrid.asp

Cheers,

--
Joerg Jooss
joerg.jooss@gmx.net
AddThis Social Bookmark Button