Please help me get the screen coordinates of the rectangle of the status icon of this TTreeNode in the TreeView (I mean the icons specified in the TTreeView.StateImages property).
There is a function TTreeView.GetHitTestInfoAt(X, Y: integer): : THitTests , but this is not quite what I am looking for; it says whether the given coordinates match the label or the icon or status icon of the element, but I need to know which part of the icon was clicked.
(The reason is because I want to implement TreeView nodes with two flags for each element, and I use StateImages to simulate flags (one state is a marked element, another state is an uncontrolled element) As I understand it, to find out which of these flags clicked, I need to compare the coordinates of the cursor with the coordinates of the status icon. How can I get them?)
delphi treeview
livin-in-daylight
source share