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

dotnet windows forms designtime

group:

Edit addButton and removeButton in CollectionEditorForm


Edit addButton and removeButton in CollectionEditorForm magic13 NO[at]SPAM korea.com
7/4/2004 10:59:23 PM
dotnet windows forms designtime:
I implemented a class that inherited the
System.ComponentMode.Design.CollectionEditor.
It's has two buttons - addButton(Insert) and removeButton(Remove).
I want to change their Enable property to false.
How can I try for it?

Re: Edit addButton and removeButton in CollectionEditorForm Andrew Smith (Infragistics)
7/7/2004 9:22:43 PM
To disable the remove button, override the CanRemoveInstance and return
false. To disable the add button, override the CreateNewItemTypes method and
return a 0 length Type array - e.g. return new Type[0];.

[quoted text, click to view]

AddThis Social Bookmark Button