Version

FromKeyButton Method (Items)

String indexer for the Toolbar items collection based on the Key property.
Syntax
'Declaration
 
Public Function FromKeyButton( _
   ByVal key As String _
) As TBarButton
public TBarButton FromKeyButton( 
   string key
)

Parameters

key

Return Value

An instance of the first TBarButton found with the given key, or null (Nothing in Visual Basic .NET) if no such button was found.
Remarks

This indexer method is deprecated because it does not properly support subclassed buttons. Developers should employ FromKeyIButton where possible to make their web applications more flexible.

When an item of the given key is found, a check is performed of whether it is of type TBarButton. If the matching item is not of the correct type, null is returned. When duplicate keys are present across items of different types, an object present in the collection may be reported not found if the first object matching key has a different type.

The comparison of the keys are performed in a case-sensitive manner.

It is the application developer's responsibility not to add buttons with the same Key value to the collection of toolbar items. For optimal performance and robustness, the avoidance of duplicate key use within the same UltraWebToolbar is strongly recommended.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also