Knowledge Base

ShellBrowser Delphi Components



Question / Problem

How can I select the columns that are (initially) displayed in the TJamShellList?

Answer / Solution

Each Windows Shell extension may define which columns will be displayed for its view.To add or remove specific columns, use the OnCreateColumns event in combination with SetColumnVisibility. 

Example:
uses ShellBrowser;

procedure TForm1.JamShellListCreateColumns(Sender: TObject);
const FirstPass: Boolean = True; 
begin
   if not FirstPass then
      Exit;  
   FirstPass := False;

   with JamShellList do
   begin
       SetColumnVisibility(TShellColumns.Size, False);
       SetColumnVisibility(TShellColumns.Author, True);
    end;
end;