If working with heavy custom drawing in a tree view, it is sometimes necessary to know, when a user tap or clicks at certain points inside a node.
I could not find any useful method to retrieve that.
Introduced the following into FMX.TMSFNCCustomTreeview.pas
function TTMSFNCCustomTreeView.XYToNodePoint(X, Y: Double; var point:TPointF; OffsetX: Single = 0): TTMSFNCTreeViewVirtualNode;
var
dsp: TTMSFNCTreeViewCacheItem;
begin
Result := nil;
dsp := XYToCacheItem(X, Y, OffsetX);
if Assigned(dsp) then
begin
point:=tpointf.Create(x,y)-dsp.DrawRect.TopLeft;
Result := dsp.Node;
end;
end;
Maybe there is another way already included.
Please consider adding such function.
Regards
Thomas