Recent

Author Topic: TShellTreeView: All Drives inside the tree  (Read 5673 times)

RAW

  • Hero Member
  • *****
  • Posts: 868
TShellTreeView: All Drives inside the tree
« on: October 27, 2016, 08:25:40 am »
Who knows how to get all the drives on a computer into the TShellTreeView? Something like RootFolder: rfDrives or Computer...
Is there an easy way that I don't see ... ?

I needed a special UI for some old computer-newbies for some programs and so I decided to do my own "Choose Folder"-Dialog without "Bling Bling"... Don't know how this is called... maybe epic minimalism...  :D

EDIT: This is easier...
Code: Pascal  [Select][+][-]
  1. Unit uSelectFolder;
  2.  {$MODE OBJFPC}{$H+}
  3.  
  4. Interface
  5.  USES
  6.   Classes,  SysUtils, Forms,   Controls,
  7.   StdCtrls, Graphics, LCLType, ShellCtrls;
  8.  
  9.  TYPE
  10.   SelectFolder = Class
  11.  
  12.    Class Procedure OnKeyDownDIR (Sender: TObject; Var Key: Word;
  13.                                  Shift: TShiftState);
  14.     PRIVATE
  15.      Class Var strResult: String;
  16.      Class Var stvDIR   : TShellTreeView;
  17.  
  18.     PUBLIC
  19.      Class Function Show: String;
  20.   End;
  21.  
  22. Implementation
  23.  
  24.  
  25. Class Function SelectFolder.Show: String;
  26.   Var
  27.    wndDIR: TForm;
  28.  Begin
  29.   Result:= '';
  30.  
  31.   wndDIR:= TForm.Create(Nil);
  32.    Try
  33.     wndDIR.BorderStyle          := bsSizeable;
  34.     wndDIR.BorderIcons          := [biSystemMenu, biMaximize];
  35.     wndDIR.Caption              := Application.Title;
  36.     wndDIR.Constraints.MinHeight:= 300;
  37.     wndDIR.Constraints.MinWidth := 400;
  38.     wndDIR.Height               := 500;
  39.     wndDIR.Width                := 700;
  40.     wndDIR.AutoScroll           := False;
  41.     wndDIR.Position             := poDesktopCenter;
  42.     wndDIR.FormStyle            := fsNormal;
  43.     wndDIR.KeyPreview           := True;
  44.     wndDIR.DoubleBuffered       := True;
  45.      wndDIR.OnKeyDown           := @OnKeyDownDIR;
  46.  
  47.     stvDIR                 := TShellTreeView.Create(wndDIR);
  48.     stvDIR.DoubleBuffered  := True;
  49.     stvDIR.BorderStyle     := bsSingle;
  50.     stvDIR.Font.Size       := 20;
  51.     stvDIR.Font.Quality    := fqAntialiased;
  52.     stvDIR.Font.Style      := [fsBold];
  53.     stvDIR.Align           := alClient;
  54.     stvDIR.AutoExpand      := True;
  55.     stvDIR.BackgroundColor := clBtnFace;
  56.     stvDIR.Root            := ExtractFileDrive(ParamStr(0));
  57.     stvDIR.Root            := '';
  58.     stvDIR.ObjectTypes     := [otFolders];
  59.     stvDIR.ReadOnly        := True;
  60.     stvDIR.ShowButtons     := True;
  61.     stvDIR.ShowRoot        := True;
  62.     stvDIR.HideSelection   := True;
  63.     stvDIR.ScrollBars      := ssAutoBoth;
  64.     stvDIR.TreeLinePenStyle:= psSolid;
  65.     stvDIR.TreeLineColor   := clLime;
  66.     stvDIR.ExpandSignColor := clLime;
  67.     stvDIR.Parent          := wndDIR;
  68.  
  69.     wndDIR.ShowModal;
  70.  
  71.     Result:= strResult;
  72.    Finally
  73.     wndDIR.Release;
  74.     wndDIR:= Nil;
  75.    End;
  76.  End;
  77.  
  78.  
  79. Class Procedure SelectFolder.OnKeyDownDIR(Sender: TObject; Var Key: Word;
  80.                                           Shift: TShiftState);
  81.  Begin
  82.   If Key = VK_RETURN
  83.   Then
  84.    Begin
  85.     strResult:= stvDIR.Path;
  86.     TForm(Sender).Close;
  87.    End;
  88.  
  89.   If Key = VK_ESCAPE
  90.   Then TForm(Sender).Close;
  91.  End;
  92.  
  93. End.
  94.  
  95. // ==================
  96. // Can be used like this:
  97.  
  98. Implementation
  99.  USES uSelectFolder;
  100.  {$R *.LFM}
  101.  
  102. Procedure TForm1.Button1Click(Sender: TObject);
  103.  Begin
  104.   Edit1.Text:= SelectFolder.Show;
  105.  End;  
  106.  


It's very easy to use:
Code: Pascal  [Select][+][-]
  1. USES
  2.  uSelectFolder;
  3.  
  4. or
  5. Implementation
  6.  USES uSelectFolder;
  7.  
  8. Procedure TForm1.Button1Click(Sender: TObject);
  9.  Begin
  10.   Edit1.Text:= SelectFolder.Show;
  11.  End;
  12.  
  13. Procedure TForm1.FormKeyDown(Sender: TObject; Var Key: Word; Shift: TShiftState);
  14.  Begin
  15.   If Key = VK_F5 Then Edit1.Text:= SelectFolder.Show;
  16.  End;  
  17.  

In the moment I don't need any network drives, so this workaround should do the job... :)
Code: Pascal  [Select][+][-]
  1. Unit uSelectFolder;
  2.  {$MODE OBJFPC}{$H+}
  3.  
  4. Interface
  5.  USES
  6.   Classes,  SysUtils, Forms,   Controls,
  7.   StdCtrls, LCLType,  Buttons, Graphics, ShellCtrls;
  8.  
  9.  TYPE
  10.   SelectFolder = Class
  11.  
  12.    Class Procedure wndDIRShow      (Sender: TObject);
  13.    Class Procedure wndDIRResize    (Sender: TObject);
  14.    Class Procedure wndDIRKeyDown   (Sender: TObject;
  15.                                     Var Key: Word; Shift: TShiftState);
  16.  
  17.    Class Procedure wndDIRWheelDown (Sender: TObject; Shift: TShiftState;
  18.                                     MousePos: TPoint; Var Handled: Boolean);
  19.    Class Procedure wndDIRWheelUp   (Sender: TObject; Shift: TShiftState;
  20.                                     MousePos: TPoint; Var Handled: Boolean);
  21.  
  22.    Class Procedure btnOKClick      (Sender: TObject);
  23.    Class Procedure btnDriveClick   (Sender: TObject);
  24.  
  25.    Class Procedure DrivesScrollLeft;
  26.    Class Procedure DrivesScrollRight;
  27.  
  28.     PRIVATE
  29.      Class Var wndDIR          : TForm;
  30.      Class Var slvList         : TShellListView;
  31.      Class Var stvDIR          : TShellTreeView;
  32.      Class Var btnOK           : TSpeedButton;
  33.      Class Var btnSelDrive     : TButton;
  34.      Class Var lBtnDrives      : TList;
  35.      Class Var strResult       : String;
  36.      Class Var iLengthBtnDrives: Integer;
  37.  
  38.     PUBLIC
  39.      Class Function Show: String;
  40.   End;
  41.  
  42. Implementation
  43.  
  44.  
  45. Class Function SelectFolder.Show: String;
  46.   Var
  47.    iWidth, iHeight: Integer;
  48.    strDrive, strAZ: String;
  49.    btnDrive       : TButton;
  50.    I, iSpace      : Integer;
  51.    slDrives       : TStringlist;
  52.  Begin
  53.   Result:= '';
  54.  
  55.   If Screen.Width < 1024
  56.   Then iWidth:= Screen.WorkAreaWidth
  57.   Else iWidth:= 1024;
  58.  
  59.   If Screen.Height < 768
  60.   Then iHeight:= Screen.WorkAreaHeight
  61.   Else iHeight:= 768;
  62.  
  63.   wndDIR:= TForm.Create(Nil);
  64.    Try
  65.     wndDIR.DoubleBuffered    := True;
  66.     wndDIR.KeyPreview        := True;
  67.     wndDIR.Position          := poDesktopCenter;
  68.     wndDIR.Width             := iWidth;
  69.     wndDIR.Height            := iHeight;
  70.     wndDIR.BorderStyle       := bsSizeable;
  71.     wndDIR.BorderIcons       := [biMaximize, biSystemMenu];
  72.     wndDIR.FormStyle         := fsStayOnTop;
  73.       wndDIR.OnKeyDown       := @wndDIRKeyDown;
  74.       wndDIR.OnShow          := @wndDIRShow;
  75.       wndDIR.OnResize        := @wndDIRResize;
  76.       wndDIR.OnMouseWheelDown:= @wndDIRWheelDown;
  77.       wndDIR.OnMouseWheelUp  := @wndDIRWheelUp;
  78.  
  79.     btnOK             := TSpeedButton.Create(wndDIR);
  80.     btnOK.Align       := alBottom;
  81.     btnOK.Height      := 50;
  82.     btnOK.Font.Size   := 20;
  83.     btnOK.Font.Quality:= fqAntialiased;
  84.     btnOK.Font.Style  := [fsBold];
  85.     btnOK.Parent      := wndDIR;
  86.     btnOK.Caption     := 'OK';
  87.       btnOK.OnClick   := @btnOKClick;
  88.  
  89.     strAZ   := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  90.     slDrives:= TStringlist.Create;
  91.      Try
  92.       For I:= 1 To Length(strAZ)
  93.       Do
  94.        Begin
  95.         If DirectoryExists(strAZ[I]+':')
  96.         Then slDrives.Add (strAZ[I]+':');
  97.        End;
  98.  
  99.       If Not slDrives.Count > 0
  100.       Then strDrive:= ''
  101.       Else
  102.        Begin
  103.         iSpace:= -100;
  104.         lBtnDrives         := TList.Create;
  105.         lBtnDrives.Capacity:= slDrives.Count;
  106.  
  107.         For I:= 0 To slDrives.Count-1
  108.         Do
  109.          Begin
  110.           iSpace:= iSpace +100;
  111.  
  112.           btnDrive                   := TButton.Create(wndDIR);
  113.           btnDrive.Parent            := wndDIR;
  114.           btnDrive.Caption           := slDrives[I];
  115.           btnDrive.Font.Size         := 20;
  116.           btnDrive.Font.Quality      := fqAntialiased;
  117.           btnDrive.Name              := 'btnDrive'+InTtoStr(I);
  118.           btnDrive.SetBounds            (iSpace, 0, 100, 50);
  119.             btnDrive.OnClick         := @btnDriveClick;
  120.             btnDrive.OnMouseWheelDown:= @wndDIRWheelDown;
  121.             btnDrive.OnMouseWheelUp  := @wndDIRWheelUp;
  122.  
  123.           lBtnDrives.Add(btnDrive);
  124.          End;
  125.  
  126.         strDrive:= slDrives[0]+'\';
  127.         TButton(lBtnDrives[0]).Font.Style:= [fsItalic, fsUnderline, fsBold];
  128.  
  129.         btnSelDrive:= TButton(lBtnDrives[0]);
  130.         iLengthBtnDrives:= 100 *lBtnDrives.Count;
  131.        End;
  132.      Finally
  133.       slDrives.Free;
  134.      End;
  135.  
  136.     slvList       := TShellListView.Create(wndDIR);
  137.     slvList.Parent:= wndDIR;
  138.     slvList.Root  := strDrive;
  139.     slvList.Hide;
  140.  
  141.     stvDIR                := TShellTreeView.Create(wndDIR);
  142.     stvDIR.AutoExpand     := True;
  143.     stvDIR.DoubleBuffered := True;
  144.     stvDIR.Parent         := wndDIR;
  145.     stvDIR.Font.Color     := clBlack;
  146.     stvDIR.BackgroundColor:= clBtnFace;
  147.     stvDIR.Font.Size      := 15;
  148.     stvDIR.Font.Quality   := fqAntialiased;
  149.     stvDIR.Root           := strDrive;
  150.     stvDIR.ShellListView  := slvList;
  151.     stvDIR.ScrollBars     := ssAutoBoth;
  152.     stvDIR.SetBounds         (0, 50, wndDIR.ClientWidth, (wndDIR.ClientHeight-100));
  153.     stvDIR.Hint           := '"T": Tree'+sLineBreak+'"D": Drives';
  154.     stvDIR.ShowHint       := True;
  155.  
  156.     If iLengthBtnDrives > wndDIR.ClientWidth
  157.     Then
  158.      Begin
  159.       wndDIR.Caption:= 'CHOOSE A FOLDER     Ctrl+ArrowKeys: Scroll Drives';
  160.       stvDIR.Hint   := '"T": Tree'+sLineBreak+'"D": Drives'+sLineBreak+'MouseWheel Up/Down: Scroll Drives';
  161.      End
  162.     Else
  163.      Begin
  164.       wndDIR.Caption:= 'CHOOSE A FOLDER';
  165.       stvDIR.Hint   := '"T": Tree'+sLineBreak+'"D": Drives';
  166.      End;
  167.  
  168.     wndDIR.ShowModal;
  169.     Result:= strResult;
  170.    Finally
  171.     lBtnDrives.Free;
  172.     wndDIR.Release;
  173.     wndDIR:= Nil;
  174.    End;
  175.  End;
  176.  
  177.  
  178. Class Procedure SelectFolder.wndDIRShow(Sender: TObject);
  179.  Begin
  180.   stvDIR.SetFocus;
  181.   stvDIR.Select(stvDIR.Items[0]);
  182.  End;
  183.  
  184.  
  185. Class Procedure SelectFolder.wndDIRResize(Sender: TObject);
  186.   Var
  187.    I, iSpace: Integer;
  188.  Begin
  189.   If iLengthBtnDrives > wndDIR.ClientWidth
  190.   Then
  191.    Begin
  192.     wndDIR.Caption:= 'CHOOSE A FOLDER     Ctrl+ArrowKeys: Scroll Drives';
  193.     stvDIR.Hint   := '"T": Tree'+sLineBreak+'"D": Drives'+sLineBreak+'MouseWheel Up/Down: Scroll Drives';
  194.    End
  195.   Else
  196.    Begin
  197.     wndDIR.Caption:= 'CHOOSE A FOLDER';
  198.     stvDIR.Hint   := '"T": Tree'+sLineBreak+'"D": Drives';
  199.    End;
  200.  
  201.   iSpace:= -100;
  202.  
  203.   For I:= 0 To lBtnDrives.Count-1
  204.   Do
  205.    Begin
  206.     iSpace:= iSpace +100;
  207.     TButton(lBtnDrives[I]).Left:= iSpace;
  208.    End;
  209.  
  210.   stvDIR.SetBounds(0, 50, wndDIR.ClientWidth, (wndDIR.ClientHeight-100));
  211.  End;
  212.  
  213.  
  214. Class Procedure SelectFolder.btnOKClick(Sender: TObject);
  215.  Begin
  216.   strResult:= stvDIR.Path;
  217.   wndDIR.Close;
  218.  End;
  219.  
  220.  
  221. Class Procedure SelectFolder.wndDIRKeyDown(Sender: TObject; Var Key: Word; Shift: TShiftState);
  222.   Var
  223.    I: Integer;
  224.  Begin
  225.   If Key = VK_ESCAPE Then wndDIR.Close;
  226.   If Key = Ord('T')  Then stvDIR.SetFocus;
  227.  
  228.   If Key = Ord('D')
  229.   Then
  230.    Begin
  231.     For I:= 0 To lBtnDrives.Count-1
  232.     Do
  233.      Begin
  234.       If TButton(lBtnDrives[I]).Left = 0
  235.       Then
  236.        Begin
  237.         TButton(lBtnDrives[I]).SetFocus;
  238.         Break;
  239.        End;
  240.      End;
  241.    End;
  242.  
  243.   If Key = VK_TAB
  244.   Then
  245.    If stvDIR.Focused
  246.    Then
  247.     Begin
  248.      For I:= 0 To lBtnDrives.Count-1
  249.      Do
  250.       Begin
  251.        If TButton(lBtnDrives[I]).Left = 0
  252.        Then
  253.         Begin
  254.          TButton(lBtnDrives[I]).SetFocus;
  255.          Break;
  256.         End;
  257.       End;
  258.     End;
  259.  
  260.   If Key = VK_RETURN
  261.   Then
  262.    If stvDIR.Focused
  263.    Then
  264.     Begin
  265.      strResult:= stvDIR.Path;
  266.      wndDIR.Close;
  267.     End;
  268.  
  269.   If (Key = VK_RIGHT) And (ssCtrl In Shift)
  270.   Then DrivesScrollRight;
  271.  
  272.   If (Key = VK_LEFT) And (ssCtrl In Shift)
  273.   Then DrivesScrollLeft;
  274.  End;
  275.  
  276.  
  277. Class Procedure SelectFolder.btnDriveClick(Sender: TObject);
  278.  Begin
  279.   If Sender Is TButton
  280.   Then
  281.    Begin
  282.     If Assigned(btnSelDrive)
  283.     Then btnSelDrive.Font.Style:= [];
  284.  
  285.     TButton(Sender).Font.Style:= [fsItalic, fsUnderline, fsBold];
  286.     btnSelDrive:= TButton(Sender);
  287.  
  288.     stvDIR.Root:= TButton(Sender).Caption+'\';
  289.     stvDIR.SetFocus;
  290.     stvDIR.Select(stvDIR.Items[0]);
  291.    End;
  292.  End;
  293.  
  294.  
  295. Class Procedure SelectFolder.DrivesScrollLeft;
  296.   Var
  297.    I: Integer;
  298.  Begin
  299.   If (TButton(lBtnDrives[0]).Left < 0)
  300.   Then
  301.    Begin
  302.     TButton(lBtnDrives[0]).SetFocus;
  303.  
  304.     For I:= 0 To lBtnDrives.Count-1
  305.     Do TButton(lBtnDrives[I]).Left:= TButton(lBtnDrives[I]).Left +100;
  306.    End;
  307.  End;
  308.  
  309.  
  310. Class Procedure SelectFolder.DrivesScrollRight;
  311.   Var
  312.    I: Integer;
  313.  Begin
  314.   If (TButton(lBtnDrives[lBtnDrives.Count-1]).Left > wndDIR.ClientWidth -100)
  315.   Then
  316.    Begin
  317.     TButton(lBtnDrives[0]).SetFocus;
  318.  
  319.     For I:= 0 To lBtnDrives.Count-1
  320.     Do TButton(lBtnDrives[I]).Left:= TButton(lBtnDrives[I]).Left -100;
  321.    End;
  322.  End;
  323.  
  324.  
  325. Class Procedure SelectFolder.wndDIRWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; Var Handled: Boolean);
  326.  Begin
  327.   DrivesScrollRight;
  328.  End;
  329.  
  330.  
  331. Class Procedure SelectFolder.wndDIRWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; Var Handled: Boolean);
  332.  Begin
  333.   DrivesScrollLeft;
  334.  End;
  335.  
  336.  
  337. End.
  338.  
« Last Edit: December 30, 2016, 05:03:29 pm by RAW »
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

totya

  • Hero Member
  • *****
  • Posts: 720
Re: TShellTreeView: All Drives inside the tree
« Reply #1 on: October 27, 2016, 09:12:39 am »
Who knows how to get all the drives on a computer into the TShellTreeView?

Hi!

I see all drive on my system with this component with default settings. Win x64.

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: TShellTreeView: All Drives inside the tree
« Reply #2 on: October 27, 2016, 10:20:49 am »
Hi,
thanks... yes me too... but only at DesignTime and there is no ObjectInspector-"Root"-Entry...

At first I thought I only need "GetBasePath"... but then there is no tree...nothing in it...
Right now I don't know how to use it in a unit without a DesignTime-Form.

Code: Pascal  [Select][+][-]
  1. ShellTreeView1.Root:= ShellTreeView1.GetBasePath;  // shows nothing... ???
  2.  

I thought a TShellListView Comp is also necessary, but it works without it very fine...
« Last Edit: October 27, 2016, 10:28:50 am by SoE »
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

totya

  • Hero Member
  • *****
  • Posts: 720
Re: TShellTreeView: All Drives inside the tree
« Reply #3 on: October 27, 2016, 11:53:57 am »
I'm sorry, but I don't know what are you talking about... if I drop a simple TShellTreeView component to the form, I see all drives at my system at runtime. See attached example. Please try it!

TShellTreeView component has Root property, this works both design and runtime for me.

If you need a special path, see for example: http://forum.lazarus.freepascal.org/index.php/topic,33739.msg218994.html

If Root dir is empty, you see all drives in your system.

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: TShellTreeView: All Drives inside the tree
« Reply #4 on: October 27, 2016, 12:16:48 pm »
Quote
if I drop a simple TShellTreeView component to the form, I see all drives at my system at runtime.
Me too... that's working fine...

But this is not working:
Code: Pascal  [Select][+][-]
  1. Unit Unit1;
  2.  {$mode objfpc}{$H+}
  3.  
  4. Interface
  5.  USES
  6.   Classes, SysUtils, Forms, Controls, Graphics, ShellCtrls;
  7.  
  8.  TYPE
  9.   TForm1 = Class(TForm)
  10.     Procedure FormCreate (Sender: TObject);
  11.  
  12.      PRIVATE
  13.       stvDIR: TShellTreeView;
  14.   End;
  15.  
  16.  VAR
  17.   Form1: TForm1;
  18.  
  19. Implementation
  20.  {$R *.lfm}
  21.  
  22. Procedure TForm1.FormCreate(Sender: TObject);
  23.  Begin
  24.   stvDIR                := TShellTreeView.Create(Self);
  25.   stvDIR.AutoExpand     := True;
  26.   stvDIR.DoubleBuffered := True;
  27.   stvDIR.Parent         := Self;
  28.   stvDIR.BackgroundColor:= clBtnFace;
  29.   stvDIR.Font.Size      := 15;
  30.   stvDIR.Font.Quality   := fqAntialiased;
  31.   stvDIR.Root           := '';
  32.   stvDIR.Align          := alClient;
  33.   stvDIR.ObjectTypes    := [otFolders];
  34.   stvDIR.ReadOnly       := True;
  35.   stvDIR.ShowButtons    := True;
  36.   stvDIR.ShowRoot       := True;
  37.   stvDIR.HideSelection  := True;
  38.   stvDIR.ShowHint       := True;
  39.  End;
  40.  
  41. End.      
  42.  

Code: Pascal  [Select][+][-]
  1. stvDIR.Root:= ''; // not working, no tree
  2. stvDIR.Root:= stvDIR.GetBasePath; // not working, no tree
  3. stvDIR.Root:= 'C:\'; // works fine, but I only see DIR C:\ of course
  4. stvDIR.Root:= '/'; // works fine, but I only see DIR I:\
  5. stvDIR.Root:= '\'; // works fine, but I only see DIR I:\ ... the same result...
  6.  
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

totya

  • Hero Member
  • *****
  • Posts: 720
Re: TShellTreeView: All Drives inside the tree
« Reply #5 on: October 27, 2016, 12:59:32 pm »
Hi!

If you can't tell what is your problem exactly, nobody can't help for you.

Now I see what is your problem. if you create TShellTreeView component at runtime, you don't see the drives...

It seems to me it's a small bug, simple workaround when you create the component at runtime:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   stvDIR:= nil;
  4.   stvDIR:= TShellTreeView.Create(Self);
  5.  
  6.   if Assigned(stvDIR) then
  7.     with stvDIR do
  8.       begin
  9.         Parent:= Panel1; // Parent component...
  10.         Align:= alClient;
  11.         Visible:= true;
  12.  
  13.         // Workaround...
  14.         Root:= ExtractFileDrive(ParamStr(0));
  15.         Root:= '';
  16.       end;
  17. end;

And then everything is works.


Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: TShellTreeView: All Drives inside the tree
« Reply #6 on: October 27, 2016, 04:15:29 pm »
I fixed that in trunk already.

You must call PopulateWithbaseFiles() after you created it at runtime (in trunk this method is public).

Bart

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: TShellTreeView: All Drives inside the tree
« Reply #7 on: October 27, 2016, 10:19:31 pm »
Quote
Root:= ExtractFileDrive(ParamStr(0));
Root:= '';
Thank you very much... that is working nice.

Quote
I fixed that in trunk already.
You must call PopulateWithbaseFiles() after you created it at runtime (in trunk this method is public).
Good to know... thank you very much.
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

 

TinyPortal © 2005-2018