Back to Devexpress

TdxCustomLayoutControl.CreateItemForControl(TControl,TdxCustomLayoutGroup) Method

vcl-dxlayoutcontrol-dot-tdxcustomlayoutcontrol-dot-createitemforcontrol-x28-vcl-dot-controls-dot-tcontrol-dxlayoutcontainer-dot-tdxcustomlayoutgroup-x29.md

latest2.3 KB
Original Source

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

delphi
function CreateItemForControl(AControl: TControl; AParent: TdxCustomLayoutGroup = nil): TdxLayoutItem;

Parameters

NameType
AControlTControl
AParentTdxCustomLayoutGroup

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.

See Also

TdxCustomLayoutControl.Clear

TdxCustomLayoutControl.CreateGroup

TdxCustomLayoutControl.CreateItem

TdxCustomLayoutControl Class

TdxCustomLayoutControl Members

dxLayoutControl Unit