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

Declaration
type  
  TacListViewColumnResizeBeginEvent = procedure(Sender: TObject; Column: TListColumn; var AllowResize: Boolean) of object;  
 
property OnColumnResizeBegin: TacListViewColumnResizeBeginEvent;  

Description
The OnColumnResizeBegin event occurs when user started to resize the list column, by dragging the divider on its header (when ViewStyle is vsReport).  
 
The Column parameter determines the column are about to be resized.  
The AllowResize parameter can be used to disallow resizing, by specifying False into it in the event handler.  

Example
procedure TForm1.acListView1ColumnResizeBegin(Sender: TObject;  
  Column: TListColumn; var AllowResize: Boolean);  
begin  
  AllowResize := (Column.Index <> 2and (Column.Index <> 3);  
end;  

See also
OnColumnResizeEnd and OnColumnDragged events.