xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.

◆ control() [3/5]

xtd::forms::control::control ( const control parent,
const std::string &  text 
)
inlineexplicit

nitializes a new instance of the control class as a child control, with specific text.

Parameters
parentThe control to be the parent of the control.
textThe text displayed by the control.
Remarks
The control class is the base class for all controls used in a Windows Forms application. Because this class is not typically used to create an instance of the class, this constructor is typically not called directly but is instead called by a derived class.
This version of the control constructor sets the initial text property value to the text parameter value. The constructor also adds the control to the parent control's control::control_collection.