ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.GetColumnInfo

Returns information about alignment and width of a column.

Syntax
Pascal
function GetColumnInfo(col: Integer; var Width: Integer): TAlignment; overload; deprecated;
Parameters 
Description 
col: Integer 
Contains the index of the column, for which the information should be returned.  
var Width: Integer 
Is an "out" parameter, which returns the default width in pixels of the column in the Windows Explorer.  

TAlignment: The alignment and size of column col

Use this function to get information about the columns, which the Explorer uses in the details view. GetColumnInfo provides the default alignment and the default width of a column, like Explorer would use it. Use GetColumnText to get the column title or the text for a specific column.

This example prepares a ListView to hold the contents of the Windows folder:

ShellBrowser.Folder := 'C:Windows';
Title := fShellBrowser.GetColumnText(0, True);
while Length(Title)>0 do begin
  col := ListView.Columns.Add;
  col.Caption := Title;
  col.Alignment := FShellBrowser.GetColumnInfo(col.Index, w);
  col.Width := w;
  Title := fShellBrowser.GetColumnText(ListView.Columns.Count, True);
end;