views:

22

answers:

1

I need to create a from which uses the same ListBox as the one from Collection Editor of Visual Studio (The ListBox under the Members label). Please, explain exactly which WinForms control is this and which of its properties are set?

You can see the control I am asking about under the Members: label of every collection editor form in design time of Visual Studio.

Thank you.

A: 

Hopefully this can get you started. There's other (probably better...) samples out there, but this is a basic starter which can help you get the concept:

http://msdn.microsoft.com/en-us/library/9zky1t4k%28VS.90%29.aspx

Quote:
This example shows how to create a control named ContactCollectionEditor that implements a custom collection editor. The example shows how to specify the exact type of the object that a page developer can add to the control's collection property when using a custom collection editor. You associate a collection editor with a collection property (or the type of the property) by applying the EditorAttribute to the collection property of the control.

code4life