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 / Windows Forms / Design Time / June 2004

Tip: Looking for answers? Try searching our database.

Obtaining the component being edited in UITypeEditor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rt - 12 Jun 2004 18:09 GMT
I have a property in a component that is a collection (array). The base type
of the item in the array contains a type which has another array. I edit the
the first array (default collection editor invoked from property grid) from
which I can edit the "next level" array. I  have a custom editor
(UITypeEditor) for the second array. My editor needs information from other
properties in the component in order to display appropriate information. How
do I obtain the component being edited?

Example of layout:

class MyComponent: Component
{
   public string AString
   {
       ...
   }

   public MyFirstType[] First
   {
       ...
   }
}

class MyFirstType
{
   public int AnInt
   {
       ...
   }

   [Editor(typeof(MySecondTypeUIEditor), typeof(UITypeEditor))]
   public MySecondType[] Second
   {
       ...
   }
}

class MySecondType
{
   ...
}

In the EditValue override for my custom UITypeEditor context.Instance points
to an object of type MyFirstType. I assume that I can use provider but I'm
not sure which service to request.

Thanks,

Rick
rt - 12 Jun 2004 18:50 GMT
Got it. I obtained the ISelectionService.

Rick

> I have a property in a component that is a collection (array). The base type
> of the item in the array contains a type which has another array. I edit the
[quoted text clipped - 45 lines]
>
> Rick

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.