Skip to main content

TdxCustomLayoutItem.Move(TdxCustomLayoutGroup,Integer,Boolean) Method

Moves the layout element to another group.

Declaration

function Move(AParent: TdxCustomLayoutGroup; AIndex: Integer; APack: Boolean = False): Boolean;

Parameters

Name Type
AParent TdxCustomLayoutGroup
AIndex Integer
APack Boolean

Returns

Type
Boolean

Remarks

Call this function to move the layout element to the group passed as the AParent parameter. Set this parameter to nil to remove the layout element from its parent group.

The AIndex parameter determines the new Index property of the moved element. First, the Move function verifies the value returned by the CanMoveTo method. Then (if the returned value is True) this function moves the layout element.

Pass True as the APack parameter to automatically simplify the layout structure after the movement is over, by using the Pack method.

The Move function returns True when the movement was successful.

See Also