ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Controls.BaseShellListView.TJamBaseShellListView.SetColumnVisibility

Set the visibility of a column.

Syntax
Pascal
function SetColumnVisibility(const pColumnID: TShellColumnId; const pVisible: Boolean): Integer; virtual;
Parameters 
Description 
const pColumnID: TShellColumnId 
A valid ShColumnId, for details see MSDN 
const pVisible: Boolean 
Pass True to add the column on and pass False to hide it. 

If pVisible is true and the given ShColumnId is valid, it returns the index of the added column. If pVisible is false or the given ShColumnId is invalid, it returns -1.

If you want to hide the Size column for example, assign the OnCreateColumns event and add this method: ShellList.SetColumnVisibility(TShellColumns.Size, false);  

For sample code regarding custom columns, see the example project CustomColumns.dproj in your ShellBrowser Delphi installation folder.

Don't use Columns.Clear or Columns.Delete to remove ShellColumns.