Recent

Author Topic: (Solved)Loading a listbox Problem  (Read 488 times)

JLWest

  • Hero Member
  • *****
  • Posts: 934
(Solved)Loading a listbox Problem
« on: March 01, 2020, 07:15:36 am »
C:\UserTest has the following sub directories, It has not files:
Test1
Test2
Test3

 Trying to load the sub directories names into Listbo11, but I dont get anything loaded. Must be a way to do this?


Code: Pascal  [Select][+][-]
  1. LoadFileBox('C:\UserTest', '*');
  2.  
  3.  procedure TForm1.LoadFileBox(const ASearchPath, ASearchMask: String);
  4.   begin
  5.    ListBox11.Items.BeginUpdate();
  6.    FindAllFiles(ListBox11.Items, ASearchPath, ASearchMask, False );
  7.    ListBox11.Items.EndUpdate();
  8.   end;  

Thanks
« Last Edit: October 23, 2020, 01:25:14 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

ASerge

  • Hero Member
  • *****
  • Posts: 1693
Re: Loading a listbox Problem
« Reply #1 on: March 01, 2020, 08:18:04 am »
Trying to load the sub directories names into Listbo11, but I dont get anything loaded. Must be a way to do this?
FindAllDirectories(ListBox1.Items, C:\UserTest', False);

JLWest

  • Hero Member
  • *****
  • Posts: 934
Re: Loading a listbox Problem
« Reply #2 on: March 02, 2020, 08:01:45 am »
Thank you

Have it working,
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

 

TinyPortal © 2005-2018