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 7628457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:35:49+00:00 2026-05-31T05:35:49+00:00

Couldn’t find any file-tree component (cross-platform, of course) in the FireMonkey framework. Anyone has

  • 0

Couldn’t find any file-tree component (cross-platform, of course) in the FireMonkey framework. Anyone has any idea or knows such a component? Sounds like a basic thing to me.

I’m looking for a simple “explorer-like” tree view, not really important if it’s really pretty as I can probably restyle it or inherit and change. Ideas?…

  • 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-31T05:35:50+00:00Added an answer on May 31, 2026 at 5:35 am

    There’s no component (out of the box) but you can quickly implement it using the unit System.IOUtils which is working on all platforms.

    For instance, to give you an idea:

    uses
      System.IOUtils, FMX.TreeView, ...
    
    type
      TForm2 = class(TForm)
        tvPath: TTreeView;
        procedure FormCreate(Sender: TObject);
      private
    ...
    
    procedure TForm2.FormCreate(Sender: TObject);
    var
      sRoot    : string;
      sdaDrives: TStringDynArray;
      sDrive   : string;
      tviDrive : TTreeViewItem;
      osv      : TOSVersion;
    begin
      if TOSVersion.Platform = pfMacOS then
      begin
        // Root's folders
        sRoot     := '/';
        sdaDrives := TDirectory.GetDirectories(sRoot);
        for sDrive in sdaDrives do
        begin
          tviDrive      := TTreeViewItem.Create(Self);
          tviDrive.Text := sDrive;
          tvPath.AddObject(tviDrive);
        end;
        sdaDrives := TDirectory.GetFiles(sRoot);
      end
      else
      begin
        // Root's folders
        sRoot     := TDirectory.GetDirectoryRoot(ParamStr(0)); // you probably want to use TDirectory.GetLogicalDrives before this one...
        sdaDrives := TDirectory.GetDirectories(sRoot);
        for sDrive in sdaDrives do
        begin
          tviDrive      := TTreeViewItem.Create(Self);
          tviDrive.Text := sDrive;
          tvPath.AddObject(tviDrive);
        end;
        sdaDrives := TDirectory.GetFiles(sRoot);
      end;
      // files
      for sDrive in sdaDrives do
      begin
        tviDrive            := TTreeViewItem.Create(Self);
        tviDrive.Text       := ExtractFileName(sDrive);
        tviDrive.Font.Style := [TFontStyle.fsItalic];
        tvPath.AddObject(tviDrive);
      end;
    end;
    

    This is just a proof of concept, as it works on both platform.. of course, there’s still some work to do…
    I have used System.SysUtils.TOSVersion to show you another record which can maybe be also useful…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I couldn't find any useful information on Microsoft's site, so here is the question:
Couldn't find anything on this with a Google Search. Does anyone know how to
Couldn't find anything related to the subject in Zend Framework API. What is the
Couldn't find any real answers on google.
I couldn't find any mapview template for the graphical layout. Mapview is from google,
I couldn't find the answer to this in any other question. Suppose that I
Couldn't find any documentation about this: what is the order of execution of the
Couldn't find any good information on how to do this so I thought I'd
Couldn't find any related resources I want to add a custom property to my
Couldn't find Submission without an ID This problem has haunted me for last few

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.