0

I have TabControl with 2 TabItems for my mobile device development. The TabItem1 has a TListView for list of items populated using LiveBindings.

Here, the TabItem2 should provide the details of the selected item in TabItem1 — no issues here.

My question is — How to trigger the move from TabItem1 to TabItem2, during item selection, using a set of code in the TabItem1.OnItemClick event?

Juke
  • 135
  • 2
  • 9

1 Answers1

1

During item selection you should use the TlistView OnItemClick event => ListView1ItemClick, not the TabItem1.OnItemClick event.

Here's an example:

procedure TForm.ListView1ItemClick(const Sender: TObject; const AItem: TListViewItem);
begin
  TabControl1.SetActiveTabWithTransition(TabItem2, TTabTransition.Slide);
end;
FHannes
  • 783
  • 7
  • 22