xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.

§ tag() [2/2]

virtual control& xtd::forms::control::tag ( std::any  tag)
inlinevirtualinherited

Sets the object that contains data about the control.

Parameters
tagA std::any that contains data about the control. The default is empty.
Remarks
Any type of class can be assigned to this property.
A common use for the tag property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer, you might store a data_set that contains the customer's order history in that control's tag property so the data can be accessed quickly.