folderlistview GetColumnAt method
Return to Introduction  Previous page  Next page
Applies to
dcFolderListView component.  

Declaration
function GetColumnAt(X: Integer): TListColumn;  

Description
The GetColumnAt method returns the list column at the specified X-coordinate.  
 
Call GetColumnAt to obtain the TListColumn object for the list item found at the position specified by the X parameter. X specify the coordinate of the position, in pixels, relative to the top left corner of the list view. If there is no item at the location, GetColumnAt returns nil.  

Example
procedure TForm1.dcFolderListView1MouseDown(Sender: TObject;  
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);  
var  
  Column: TListColumn;  
begin  
  Column := dcFolderListView1.GetColumnAt(X);  
  if Column <> nil then  
    Caption := Column.Caption;  
end;  

See also
GetItemAt method.