Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxTileControlItemDetailOptions.DetailControl Property

Associates a control to be displayed by a detail page on tile activation.

#Declaration

Delphi
property DetailControl: TWinControl read; write;

#Property Value

Type
TWinControl

#Remarks

Use this property to associate a tile item with a detail control (any TWinControl descendant, for instance, TFrame). Activating the tile item using either a click or tap will display the associated detail control in a detail page.

With the DetailControl property, you can vary tile activation results for individual tile items, making them context-sensitive or conditional. For example, you can handle a tile item’s OnActiveFrameChanged event to switch the DetailControl property value based on the currently active tile frame, as shown below.

procedure <Form>.<TileControlItem>.ActiveFrameChanged(Sender: TdxTileControlItem)
var
  ADetailControl: TWinControl;
begin
  case Sender.ActiveFrameIndex of
    1: ADetailControl := Panel2;
    2: ADetailControl := Panel3;
  else
    ADetailControl := Panel1;
  end;
  Sender.DetailOptions.DetailControl.Visible := False;
  Sender.DetailOptions.DetailControl := ADetailControl;
end;

This code example rotates TPanel objects (Panel1, Panel2, and Panel3) as a tile item’s detail control.

You can programmatically show or close detail pages via a tile item’s ActivateDetail and DeactivateDetail methods. To respond to item activations, handle a tile item’s OnActivateDetail and OnDeactivateDetail events.

See Also