TdxCustomLayoutControl.CreateItemForControl(TControl,TdxCustomLayoutGroup) Method
Creates a new item for an existing control, places it within a specific group and returns the newly created item.
Declaration
function CreateItemForControl(AControl: TControl; AParent: TdxCustomLayoutGroup = nil): TdxLayoutItem;
Parameters
Name | Type |
---|---|
AControl | TControl |
AParent | TdxCustomLayoutGroup |
Returns
Type |
---|
TdxLayoutItem |
Remarks
Call this method to create a new item for an existing control (AControl) and place it into the group specified by the AParent parameter. The AParent parameter specifies the parent group of the newly created item. By default, the AParent parameter is nil and the created item is invisible and presented in the list of available items of the Layout Control. To make this item visible, assign its Parent property to any visible group. After this, the newly created item is removed from the available item list.
Assume, there is a text edit control somewhere on your form and you want to place it into a specific group of the ExpressLayout Control. In this instance, you can call the CreateItemForControl method and pass the text edit control name via the AControl parameter and the name of the parent group via the AParent parameter. The parent group will contain this newly created item.