Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / January 2006

Tip: Looking for answers? Try searching our database.

Custom editor and PropertyGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bp - 24 Jan 2006 08:39 GMT
I have a custom UITypeEditor for a property of type collection of a
component. I have created a form with a propertyGrid to edit values of each
Item of this collection, and I call it in EditValue of my custom editor.

Each item has a property of type Control, and I'd like to retrieve the
controls which are on the edited form (the form which own the component) in
order to assign one of them to the control propriety. But when I click on
this propriety, no control is displayed.

How can I retrieve the list of controls of the edited form and indicate to
the PropertyGrid that these controls can be assigned to the item propriety ?

Thanks in advance
Carlos J. Quintero [VB MVP] - 24 Jan 2006 12:18 GMT
I am not sure, but I think that you need to get the
System.ComponentModel.Design.IDesignerHost (by calling Site.GetService or
other means) and then you have IDesignerHost.Container.Components, etc.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

>I have a custom UITypeEditor for a property of type collection of a
> component. I have created a form with a propertyGrid to edit values of
[quoted text clipped - 12 lines]
>
> Thanks in advance
bp - 24 Jan 2006 14:43 GMT
Thank you for your interest...

I was thinking about the IDesignerHost interface too, but the hardest job is
to tell the PropertyGrid that the controls we can assign to the propriety are
those we retrieve with the interface...

Any idea ?
Carlos J. Quintero [VB MVP] - 25 Jan 2006 10:26 GMT
I think that you want to do something similar to the ImageList property of
some controls like the ListView and TreeView, right? Download Reflector for
.NET (http://www.aisto.com/roeder/dotnet/) and decompile the UI editor used
for that property in those controls. You can learn a lot with that tool.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> Thank you for your interest...
>
[quoted text clipped - 5 lines]
>
> Any idea ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.