xtd 0.2.0
Loading...
Searching...
No Matches

◆ control() [5/5]

xtd::forms::control::control ( const control parent,
const xtd::string text,
int32  left,
int32  top,
int32  width,
int32  height 
)

Initializes a new instance of the xtd::forms::control class as a child control, with specific text, size, and location.

Parameters
parentThe control to be the parent of the control.
textThe text displayed by the control.
leftThe x position of the control, in pixels, from the left edge of the control's container. The value is assigned to the xtd::forms::control::left property.
topThe y position of the control, in pixels, from the top edge of the control's container. The value is assigned to the xtd::forms::control::top property.
widthThe width of the control, in pixels. The value is assigned to the xtd::forms::control::width property.
heightThe height of the control, in pixels. The value is assigned to the xtd::forms::control::height property.
Remarks
The xtd::forms::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 xtd::forms::control constructor sets the initial xtd::forms::control::text property value to the text parameter value. The constructor also adds the control to the xtd::forms::control::parent control's control::control_collection. The initial xtd::forms::control::size and xtd::forms::control::location of the control are determined by the left, top, width and height parameter values.