Problem with ShellTreeView and Color/BackgroundColor lazarus / 39-Graphics ---------------------------------------------------------------------- jipété · 2024-09-28 16:47 Hello, ParentColor not checked. SelectionColor is clHighlight TreeLineColor is clWindowFrame If I change stv.Color, a change occurs on stv.BackgroundColor, changing to the same color as stv.color If I change stv.BackgroundColor, a change occurs on stv.Color, changing to the same color as stv.BackgroundColor In short, Color and BackgroundColor are always identical. Searched the forum for ShellTreeView Color BackgroundColor, found nothing... Thanks for the help and best regards, Linux Debian 11.9 GTK 2.8 FPC 3.2.2 Laz 3.4 ---------------------------------------------------------------------- wp · 2024-09-28 17:31 Quote from: jipété on September 28, 2024, 06:47:39 pmIn short, Color and BackgroundColor are always identical. Yes, they are. Look at the source code (of TCustomTreeView where this comes in): 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 function TCustomTreeView.GetBackgroundColor: TColor;begin  Result := Color;end; procedure TCustomTreeView.SetBackgroundColor(Value: TColor);begin  if Color<>Value then begin    Color:=Value;    Invalidate;  end;end;The getter/setter of the BackgroundColor property do nothing else than getting/setting the normal Color property... Since every control has a Color property for its background color, it is hard to understand why the treeview duplicates this in BackgroundColor. Maybe for better clarity? Anyway, back in 2016 I prosed to mark this property as "deprecated" (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/30312). Maybe it's time to do this now? ("Deprecated" means that the property should not be used any more since it will be removed in Laz v4.99, (or 5.99 - I always forget...)). ---------------------------------------------------------------------- jipété · 2024-09-29 07:04 Thanks, wp ---------------------------------------------------------------------- AlexTP · 2024-09-29 07:12 Yes better mark duplicated property as deprecated. But if duplicated name not exists in Delphi's ShellTreeview.