Problem with TTreeNodeShape.ClickedImage
Posted: Tue Jul 26, 2005 8:40 am
Hi
I have node with a picture (ImageIndex = tiChecked) and I'd like to know when the user click on this picture. So I wrote :
OnNodeClick(Sender: TTreeNodeShape;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Sender.ClickedImage(X, Y) then
begin
...
end;
...
end;
It works fine as long as I don't have any scrollbars with position <> 0 in the TeeTree component.
When I have a scrollbar with position <> 0, the XY coordinates are relative to component space and not the tree space.
Could you tell me what I have done wrong ?
Thanks
Nico
I have node with a picture (ImageIndex = tiChecked) and I'd like to know when the user click on this picture. So I wrote :
OnNodeClick(Sender: TTreeNodeShape;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Sender.ClickedImage(X, Y) then
begin
...
end;
...
end;
It works fine as long as I don't have any scrollbars with position <> 0 in the TeeTree component.
When I have a scrollbar with position <> 0, the XY coordinates are relative to component space and not the tree space.
Could you tell me what I have done wrong ?
Thanks
Nico