ToolTip.Tag ToolTip.Tag ToolTip.Tag ToolTip.Tag Property

定义

获取或设置包含由程序员提供的数据的对象,这些数据与 ToolTip 关联。Gets or sets the object that contains programmer-supplied data associated with the ToolTip.

public:
 property System::Object ^ Tag { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))]
public object Tag { get; set; }
member this.Tag : obj with get, set
Public Property Tag As Object

属性值

一个 Object,包含有关 ToolTip 的数据。An Object that contains data about the ToolTip. 默认值为 nullThe default is null.

注解

通常, 使用Tag属性来存储与密切关联的ToolTip数据。Typically, you use the Tag property to store data that is closely associated with the ToolTip. 例如, 如果您正在ToolTip为显示客户信息的控件显示, 则您可以DataSet将包含Tag客户信息的包含在属性中, 以便快速访问数据。For example, if you are displaying a ToolTip for a control that displays customer information, you might store the DataSet that contains the customer's information in the Tag property so the data can be accessed quickly.

适用于

另请参阅