Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:05:19+00:00 2026-05-27T10:05:19+00:00

Is it possible using the standard TTreeView to change the Expand and Collapse Image?

  • 0

Is it possible using the standard TTreeView to change the Expand and Collapse Image?

I don’t mean Node images, I mean the little arrows next to Nodes that have children, like so:

enter image description here

Ideally I would like the arrows to show as + and – Symbols, like the Delphi component structure tree:

enter image description here

If it is possible to change this, how would I go about doing it?

Working Demo based on David’s Answer

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, Themes, uxTheme;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

type
  TMyTreeView = class(TTreeView)
  protected
    procedure CreateWnd; override;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TMyTreeView }

procedure TMyTreeView.CreateWnd;
begin
  inherited;
  if ThemeServices.Enabled and CheckWin32Version(6, 0) then
    SetWindowTheme(Handle, nil, nil);
end;

procedure TForm1.FormCreate(Sender: TObject);
var
  MyTree: TMyTreeView;
  Node: TTreeNode;
begin
  MyTree := TMyTreeView.Create(nil);
  with MyTree do
  begin
    Parent  := Self;
    Height  := 100;
    Width   := 100;
    Left    := 30;
    Top     := 30;

    Node := Items.Add(nil, 'Item');
    Items.AddChild(Node, 'Item');
    Node := Items.AddChild(Node, 'Item');
    Items.AddChild(Node, 'Item');
  end;
end;

end.

The Result:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:05:19+00:00Added an answer on May 27, 2026 at 10:05 am

    Tree views in post-Vista Windows have two alternative themes. The theme that you are wanting to avoid is known as the explorer theme. You want to use the standard theme. A control has to opt-in to get the explorer theme. It does so via the SetWindowTheme API. The VCL tree view control calls this to opt-in. It does so at the end of its CreateWnd method.

    You can revert to the standard theme by undoing the change like this:

    type
      TMyTreeView = class(TTreeView)
      protected
        procedure CreateWnd; override;
      end;
    
    procedure TMyTreeView.CreateWnd;
    begin
      inherited;
      if StyleServices.Enabled and TOSVersion.Check(6) and StyleServices.IsSystemStyle then
        SetWindowTheme(Handle, nil, nil);
    end;
    

    This code is written for XE2. If you have an earlier Delphi then I think you want it like this:

      if ThemeServices.Enabled and CheckWin32Version(6, 0) then
        SetWindowTheme(Handle, nil, nil);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to replace the standard broken image via CSS or using another
Is it possible to clear a file preserving its timestamp, using standard Linux commands?
Now I'm using standard phase correlation for image stitching. It give normal results, but
If possible, using only standard PHP functions like substr(), strrpos(), strpos(), etc.
I am wondering if it is possible to post data without using the standard
Is it possible using a standard unordered list with a fixed height, to have
I am not sure if this is possible using standard web technologies. I want
Using standard C++ I/O (such as std::cout ), is it possible to print the
Is it possible (using the standard java.nio api, without major hacking or proxying or
I am trying to switch between different resolutions (original-standard-high) of an image using ONLY

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.