Export (0) Print
Expand All

ToolBarButton.Tag Property

Gets or sets the object that contains data about the toolbar button.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<BindableAttribute(true)>]
[<TypeConverterAttribute(typeof(StringConverter))>]
member Tag : Object with get, set

Property Value

Type: System.Object
An Object that contains data about the toolbar button. The default is a null reference (Nothing in Visual Basic).

Retrieves or assigns the data currently associated with the toolbar button. Any Object derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned.

The following code example demonstrates how to use the Pushed, PartialPush, and Tag properties. To run the example, paste the following code in a form containing a RichTextBox control called RichTextBox1. Call the InitializeToolBar method in the form's constructor or Load method.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft