TTMSFMXTreeView.SelectedNode and FocusedNode

Hi all,

after clicking on a tree node I have a reaction in OnClick and OnAfterSelectNode but FocusedNode and SelectedNode is nil. Clicking a second time on any node both values are set correctly. I think this is not ok...

Best regards,
Hartmut
Hi,

The SelectedNode property is identical to the FocusedNode property and maps on the node that is focused after interaction completes, therefore we have introduced the SelectedNodes list that allows you to retrieve the nodes that have been selected, regardless of the focused node. The code below demonstrates this.


procedure TForm1.TMSFMXTreeView1AfterSelectNode(Sender: TObject;
  ANode: TTMSFMXTreeViewVirtualNode);
var
  I: Integer;
begin
  for I := 0 to TMSFMXTreeView1.SelectedNodeCount - 1 do
    Log.d(TMSFMXTreeView1.SelectedNodes.Text[0]);
end;