Hi iainscott,
What you need is an ExpandableObjectConverter which encapsulates all this
functionality to make the property expandable.
Check out this article on the same topic
http://www.bluevisionsoftware.com/WebSite/TipsAndTricksDetails.aspx?Name=Expanda
bleObjectConverter
Let me know if I could be of more help.
HTH,
Rakesh Rajan
> Does anyone know how to make a multi-attribute property show in the design
> time property window of VS IDE in the same way as .Net controls e.g. the Font
[quoted text clipped - 9 lines]
>
> many thanks
iainscott - 30 Oct 2004 14:43 GMT
Thanks Rakesh, I think of I've got the haqng of it now.
I have come across another sticking point, however. I have a pop up form
within my control which contains a list box which I wish to poulate both at
design-time and run time. The pop up form is instantiated in the control's
constructor and persists for the lifetime of the parent control being either
hidden or shown as required. When I expose the listbox items collection with
the following code the property appears in the design time property grid but
when I use the collections editor I cannot change any of the values. I can
add new items to the list which persist between sessions but I still cannot
change the list item object. Any suggestions?
private PopUpForm puf = null;
private System.ComponentModel.Container components = null;
public MyControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
puf = new PopUpForm();
}
...
[DesignerS erializationVisibility(DesignerSerializationVisibility.Content)]
public System.Windows.Forms.ListBox.ObjectCollection Items
{
get
{
return puf.ListBox.Items;
}
}
Hope someone can see where I'm being an idiot!
Best wishes.
> Hi iainscott,
>
[quoted text clipped - 21 lines]
> >
> > many thanks