Skip to main content
Version: 3.5

ToolBarButtonCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Represents the collection of ToolBarButton controls in a ToolBar control.

public class ToolBarButtonCollection : IList, ICollection, IEnumerable

Constructors​

Instance memberToolBarButtonCollection(owner)​

Initializes a new instance of the ToolBarButtonCollection class.

NameTypeDescription
ownerToolBarThe ToolBar control that owns this collection.

Properties​

Instance memberIsReadOnly​

Boolean: Returns a value indicating whether this collection is read-only.

Instance memberItem(index)​

ToolBarButton: Returns or sets the ToolBarButton at the specified index.

Instance memberItem(name)​

ToolBarButton: Returns the ToolBarButton identified by the name.

Methods​

Instance memberAdd(text)​

Adds a ToolBarButton with the specified text to the collection.

ParameterTypeDescription
textStringThe text for the ToolBarButton that is being added.

Returns: ToolBarButton. A ToolBarButton that represents the panel that was added to the collection.

Instance memberAdd(button)​

Adds a ToolBarButton to the collection.

ParameterTypeDescription
buttonToolBarButtonA ToolBarButton that represents the panel to add to the collection.

Returns: Int32. The zero-based index of the item in the collection.

Throws:

Instance memberAddRange(buttons)​

Adds an array of ToolBarButton to the collection.

ParameterTypeDescription
buttonsToolBarButton[]Array of ToolBarButton objects to add to the collection.

Instance memberClear()​

Removes all ToolBarButton objects from the collection.

Instance memberClear(dispose)​

Removes and optionally disposes all ToolBarButton objects from the collection.

ParameterTypeDescription
disposeBooleanIndicates whether the removed items should be disposed.

Instance memberContains(button)​

Determines whether the specified ToolBarButton is located within the collection.

ParameterTypeDescription
buttonToolBarButtonThe ToolBarButton to locate in the collection.

Returns: Boolean. true if the ToolBarButton is located within the collection; otherwise, false.

Instance memberContainsKey(key)​

Determines whether the collection contains a ToolBarButton with the specified key.

ParameterTypeDescription
keyStringThe name of the item to find in the collection.

Returns: Boolean. true to indicate the collection contains a ToolBarButton with the specified key; otherwise, false.

Instance memberGetEnumerator()​

Returns an enumerator to use to iterate through the ToolBarButton objects in the collection.

Returns: IEnumerator. An IEnumerator that represents the item collection.

Instance memberIndexOf(button)​

Returns the index within the collection of the specified ToolBarButton.

ParameterTypeDescription
buttonToolBarButtonThe ToolBarButton to locate in the collection.

Returns: Int32. The zero-based index where the ToolBarButton is located within the collection; otherwise, negative one (-1).

Instance memberIndexOfKey(key)​

Returns the index of the first occurrence of a ToolBarButton with the specified key.

ParameterTypeDescription
keyStringThe name of the ToolBarButton to find in the collection.

Returns: Int32. The zero-based index of the first occurrence of the ToolBarButton with the specified key, if found; otherwise, -1.

Instance memberInsert(index, button)​

Inserts the specified ToolBarButton into the collection at the specified index.

ParameterTypeDescription
indexInt32The zero-based index location where the panel is inserted.
buttonToolBarButtonA ToolBarButton representing the panel to insert.

Throws:

Instance memberRemove(button)​

Removes the specified ToolBarButton from the collection.

ParameterTypeDescription
buttonToolBarButtonThe ToolBarButton representing the panel to remove from the collection.

Throws:

Instance memberRemoveAt(index)​

Removes the ToolBarButton located at the specified index within the collection.

ParameterTypeDescription
indexInt32The zero-based index of the item to remove.

Throws:

  • ArgumentOutOfRangeException The index parameter is less than zero or greater than or equal to the value of the Count property of the ToolBarButtonCollection class.

Instance memberRemoveByKey(key)​

Removes the ToolBarButton with the specified key from the collection.

ParameterTypeDescription
keyStringThe name of the ToolBarButton to remove from the collection.