Mega Code Archive

 
Categories / Delphi / Files
 

Show multiple columns in a TFileListBox

Title: show multiple columns in a TFileListBox? procedure ShowMultiColumns(FileListBox: TFileListBox; bValue: Boolean); begin with TDirectoryListBox(FileListBox) do begin Columns := Ord(bValue) and (Ord(bValue) and 1); SendMessage(Handle, LB_SETCOLUMNWIDTH, Canvas.TextWidth('WWWWWWWW.WWW'), 0); end; end; {Example:} procedure TForm1.Button1Click(Sender: TObject); begin ShowMultiColumns(FileListBox1, True); end;