TreeView patch to add hottrack via item background color lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2018-05-31 12:47 i want to make such patch for Treeview. it is like VSCode editor does when mouse moves over tree. a- will be it be used? b- what new property to you recommend to add it? ---------------------------------------------------------------------- wp · 2018-05-31 13:39 I don't think that it is a good idea to blow up standard controls with more and more user-provided properties, in particular since the TreeView already has ample custom drawing capabilities. After a few minutes of navigating through the treeview code I was able to accomplish your requirement by this OnCustomDraw event handler: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.TreeView1CustomDrawItem(Sender: TCustomTreeView;  Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);var  R: TRect;begin  R := Node.DisplayRect(true);  if PtInRect(R, sender.ScreenToClient(Mouse.CursorPos)) then begin    Sender.Canvas.Brush.Color := clYellow;    Sender.Canvas.FillRect(R);  end;  inherited;end; ---------------------------------------------------------------------- AlexTP · 2018-05-31 16:11 adding all props to LCL isnot good, but maybe patch will be faster, smaller than this.