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

◆ controls() [1/2]

virtual control_collection & xtd::forms::control::controls ( )
virtualnoexcept

Gets the collection of controls contained within the control.

Returns
A control::control_collection representing the collection of controls contained within the control.
Remarks
A control can act as a parent to a collection of controls. For example, when several controls are added to a form, each of the controls is a member of the control::control_collection assigned to the controls property of the form, which is derived from the control class.
You can manipulate the controls in the control::control_collection assigned to the controls property by using the methods available in the control::control_collection class.
When adding several controls to a parent control, it is recommended that you call the suspend_layout method before initializing the controls to be added. After adding the controls to the parent control, call the resume_layout method. Doing so will increase the performance of applications with many controls.
Use the controls property to iterate through all controls of a form, including nested controls. Use the get_next_control method to retrieve the previous or next child control in the tab order. Use the active_control property to get or set the active control of a container control.
Examples
button2.cpp, and emplace.cpp.