...show multiple columns in a TFileListBox?

Author: Thomas Stutz

Category: VCL

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;

 

printed from
www.swissdelphicenter.ch
developers knowledge base