Difference between revisions of "TFileListBox"
From Lazarus wiki
Jump to navigationJump to search (added a see also) |
m (Fixed a few typos, wiki markup) |
||
Line 1: | Line 1: | ||
− | '''TFileList''' [[image:TFileListBox_Icon.png]] box provides a very simple means of showing | + | '''TFileList''' [[image:TFileListBox_Icon.png]] box provides a very simple means of showing end users a list of files in a particular directory and allowing them to select one or more files. It is available under the [[Misc_tab|Misc tab]] on the [[Component Palette]]. |
− | Drop the component | + | Drop the component on a form, set the Directory property and possibly the Mask property and it is done. |
[[image:TFileListBox.png]] | [[image:TFileListBox.png]] | ||
− | You can determine which file the user clicked like this | + | You can determine which file the user clicked like this: |
+ | |||
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> | ||
procedure TForm1.FileListBox1Click(Sender: TObject); | procedure TForm1.FileListBox1Click(Sender: TObject); | ||
Line 13: | Line 14: | ||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
==See also== | ==See also== | ||
− | |||
− | [[TShellListView]] | + | * [[FindAllFiles]] |
+ | * [[TShellListView]] | ||
{{LCL Components}} | {{LCL Components}} |
Latest revision as of 06:37, 2 June 2020
TFileList box provides a very simple means of showing end users a list of files in a particular directory and allowing them to select one or more files. It is available under the Misc tab on the Component Palette.
Drop the component on a form, set the Directory property and possibly the Mask property and it is done.
You can determine which file the user clicked like this:
procedure TForm1.FileListBox1Click(Sender: TObject);
begin
showmessage('you clicked ' + Filelistbox1.Items[FileListBox1.ItemIndex]);
end;
See also