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?
During item selection yo should use the TlistView
OnItemClick
event => ListView1ItemClick
not the
TabItem1.OnItemClick
procedure TForm.ListView1ItemClick(const Sender: TObject; const AItem: TListViewItem);
begin
TabControl1.SetActiveTabWithTransition(TabItem2, TTabTransition.Slide);
end;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.