[SOLVED]Can I change the background color while editing the TreeView node text? lazarus / 31-LCL ---------------------------------------------------------------------- tomitomy · 2017-10-27 02:48 Hi, I would like to change the background color when editing the TreeView node text, this can be achieved? Or change the font color, Because their colors are too close. Lazarus 1.8.0 RC4 GTK2 ---------------------------------------------------------------------- zeljko · 2017-10-27 07:15 It looks like gtk2 theme problem. ---------------------------------------------------------------------- tomitomy · 2017-10-27 09:00 Quote from: zeljko on October 27, 2017, 09:15:59 amIt looks like gtk2 theme problem. Oh, It's bad news. Thank you zeljko. ---------------------------------------------------------------------- tomitomy · 2017-11-02 08:24 I use TEdit instead of Naming Box to achieve my needs: 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 unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    Edit1: TEdit;  TreeView1: TTreeView;    procedure Edit1Exit(Sender: TObject);    procedure Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);    procedure TreeView1Editing(Sender: TObject; Node: TTreeNode; var AllowEdit: Boolean);  private   public   end; var  Form1: TForm1; implementation uses  LCLType; {$R *.lfm} { TForm1 } procedure TForm1.TreeView1Editing(Sender: TObject; Node: TTreeNode; var AllowEdit: Boolean);var  ANode: TTreeNode;  ARect: TRect;begin  AllowEdit := False;   ANode := TreeView1.Selected;  if ANode = nil then Exit;                 Edit1.Parent := TreeView1;  ARect := ANode.DisplayRect(True);  ARect.Right := TreeView1.Width;  Edit1.BoundsRect := ARect;   Edit1.Text := ANode.Text;  Edit1.SelectAll;  Edit1.Show;       Edit1.SetFocus;end; procedure TForm1.Edit1Exit(Sender: TObject);  var  ANode: TTreeNode;begin  ANode := TreeView1.Selected;  if ANode = nil then Exit;   ANode.Text := Edit1.Text ;  Edit1.Hide;end; procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin  case Key of    VK_RETURN: Edit1.OnExit(Sender);    VK_ESCAPE: Edit1.Hide;  end;end; end.