Highlighting the entire row width in TLazVirtualStringTree [SOLVED] lazarus / 21-General ---------------------------------------------------------------------- carl_caulkett · 2024-09-29 12:30 * Mac Mini M1 * macOS 14.6.1 * Lazarus 3.4 * FPC 3.2.2 Is it possible to configure a TLazVirtualStringTree so that the highlighted row extends beyond Column 0 to all the columns in use? If not set in the form designer, will I have to investigate owner-draw code to paint the background myself? ---------------------------------------------------------------------- carl_caulkett · 2024-09-29 12:38 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 TMain.PresetTreeBeforeCellPaint(Sender: TBaseVirtualTree;  TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;  CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);begin  if PresetTree.Selected[Node] then  begin    TargetCanvas.Brush.Color := clHighlight;    TargetCanvas.FillRect(CellRect);  end;end; ---------------------------------------------------------------------- wp · 2024-09-29 16:54 No need for custom painting. In the tree's TreeOptions.SelectOptions there's a toFullRowSelect. ---------------------------------------------------------------------- carl_caulkett · 2024-09-30 14:20 I searched high and low, but I didn't spot that! Thanks, I'll add it in now!