Table view, long tap gesture and detail view

  1. I wanted to implement some action on a long tap gesture for a table view row. The table view row also has a detail view assigned. Now it happens that the long tap gesture is fired, but then also the row is selected and its detail view is pushed. Is it possible to just fire the long tap gesture?



    2. Why is the long tap gesture for the table view also fired if the detail view is active?

Hi, 


1) The selection is done in the default mousedown/mousemove/mouseup events. There isn't a separate event for long tap gestures and there isn't a detection if a gesture is used or not. We have added this on our todolist for further investigation.

2) If you applied the gesture on the highest level then the gesture event will be triggered for the detailview as well as this is a control that is pushed inside the main tableview, which passes the events to the highest level. Perhaps you will need to attach a gesture event to the list container instead. The list container can be retrieved with TMSFMXTableView1.GetListContainer, but will only return a reference to the list when the style is loaded. The correct place to assign the gesture event would be in the OnApplyStyleLookup event of the TTMSFMXTableView.

procedure TForm1.TMSFMXTableView1ApplyStyleLookup(Sender: TObject);
begin
  TMSFMXTableView1.GetListContainer.OnGesture := ...
end;

Kind Regards, 
Pieter