Recent

Author Topic: Filling a listbox from a dir  (Read 3856 times)

lucamar

  • Hero Member
  • *****
  • Posts: 3075
Re: Filling a listbox from a dir
« Reply #15 on: March 03, 2019, 06:13:54 pm »
I'm Using a TFileList box to display a directory's files.

Is it possible with this control to also show the sub directories in the listbox or is it only for files..

Yes, it's possible. Set FileListBox.FileType to FileListBox.FileType + [ftDirectory]; either in code or in the Object Inspector. Or viceversa to not show them.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: Filling a listbox from a dir
« Reply #16 on: March 03, 2019, 06:39:31 pm »
Thanks
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

lucamar

  • Hero Member
  • *****
  • Posts: 3075
Re: Filling a listbox from a dir
« Reply #17 on: March 03, 2019, 07:36:58 pm »
I know you'll probably not need it but just in case (and because I was bored :)) I've prepared a basic mini-demo of FileListBox. Have fun!
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: Filling a listbox from a dir
« Reply #18 on: March 03, 2019, 11:40:08 pm »
Thanks I'll try it out.
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