listview OnColumnDragged event
Return to Introduction  Previous page  Next page
Applies to
acListView and acDBListView components.  

Declaration
type  
  TacListViewColumnDraggedEvent = procedure(Sender: TObject; ColumnOrders: array of Integer) of object;  
 
property OnColumnDragged: TacListViewColumnDraggedEvent;  

Description
The OnColumnDragged event occurs when user have moved the column using a mouse. The ColumnOrders parameter determines new orders of the columns.  
 
tip To make columns of the list-view "draggable" — set FullDrag property to True.  

Example
procedure TForm1.SearchResultsViewColumnDragged(Sender: TObject;  
  ColumnOrders: array of Integer);  
var  
  I: Integer;  
begin  
  for I := 0 to ListView1.Columns.Count - 1 do  
    Memo1.Lines.Add(IntToStr(ColumnOrders[I]));  
end;  

Note
This event supported since Delphi 4 and later or C++ Builder 4 and later  

See also
OnColumnResize event.