Class ButtonEdit.ButtonEditChildButtonCollection
Collection of ButtonEditChildButton objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class ButtonEditChildButtonCollection : CollectionBase, IList, ICollection, IEnumerable
Remarks
The collection of ButtonEditChildButton controls that make up the Buttons property of the ButtonEdit class.
You will not need to use this class directly.
Constructors
ButtonEditChildButtonCollection(ButtonEdit)
Creates an object of type ButtonEdit.ButtonEditChildButtonCollection.
Declaration
public ButtonEditChildButtonCollection(ButtonEdit owner)
Parameters
Type | Name | Description |
---|---|---|
ButtonEdit | owner | The ButtonEdit object that owns this collection. |
Remarks
The ButtonEdit class that owns this collection is passed in as a parameter and this collection class will use this reference to the owner to inform it to add a Button control or remove a Button control when an item is added or removed to the collection.
Properties
Item[Int32]
Gets / sets the Indexer property for ButtonEdit.ButtonEditChildButtonCollection
Declaration
public ButtonEditChildButton this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
ButtonEditChildButton |
Remarks
This allows the ButtonEditChildButtons to be accessed through the indexer.
Methods
Add(ButtonEditChildButton)
Adds a ButtonEditChildButton to the collection.
Declaration
public int Add(ButtonEditChildButton button)
Parameters
Type | Name | Description |
---|---|---|
ButtonEditChildButton | button | The object to be added. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the object in the collection. |
Remarks
Add an item to the internal List object results in the OnInsertComplete(Int32, Object) method being invoked.
Contains(ButtonEditChildButton)
Indicates whether an object exists in this collection.
Declaration
public bool Contains(ButtonEditChildButton button)
Parameters
Type | Name | Description |
---|---|---|
ButtonEditChildButton | button | The object to check for. |
Returns
Type | Description |
---|---|
System.Boolean | True if the object exists in this collection; false otherwise. |
Remarks
This method is used for checking if an item exists in the collection before trying to delete or change that item.
CopyTo(ButtonEditChildButton[], Int32)
Copies elements of this collection to another collection starting at an index.
Declaration
public void CopyTo(ButtonEditChildButton[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
ButtonEditChildButton[] | array | The array to be copied to. |
System.Int32 | index | The index to begin from. |
Remarks
The internal List copies the child buttons to the new array passed in.
OnInsertComplete(Int32, Object)
Derived handler for the InsertComplete event.
Declaration
protected override void OnInsertComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the inserted item. |
System.Object | value | The object that was inserted. |
Overrides
Remarks
Be sure to call the base class implementation of this method if overriding.
The owner (the ButtonEdit) control is instructed to insert a new ButtonEditChildButton.
OnRemoveComplete(Int32, Object)
Derived handler for the RemoveComplete event.
Declaration
protected override void OnRemoveComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the inserted item. |
System.Object | value | The object that was inserted. |
Overrides
Remarks
The owner is informed by the collection to re-layout itself to accommodate the change.
Remove(ButtonEditChildButton)
Removes aButtonEditChildButton object from the collection.
Declaration
public void Remove(ButtonEditChildButton button)
Parameters
Type | Name | Description |
---|---|---|
ButtonEditChildButton | button | The ButtonEditChildButton that is to be removed from the collection. |
Remarks
Removes the ButtonEditChildButton from the internal List object if the ButtonEditChildButton exists.