Vcl.ComCtrls.TWorkAreas.Insert
Delphi
function Insert(Index: Integer): TWorkArea;
C++
HIDESBASE TWorkArea* __fastcall Insert(int Index);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TWorkAreas |
Description
Creates a new TWorkArea object and adds it to the Items property array in a specified position.
Call Insert to add a new work area to the list view that owns this TWorkAreas object. Insert adds a new work area at the position specified by the Index parameter. Existing work areas (starting from the specified position) are moved up in the Items array. Insert returns the newly created TWorkArea object. After inserting a new work area, set the work area's Rect property to indicate what portion of the list view's client area it represents.
Note: Usually, there is no meaningful difference between using the Add method or the Insert method to add work areas. However, if two or more work areas specify overlapping regions, then the order of the work areas in the Items array determines which work area is associated with list items in the overlapping region. Specifically, list items in the overlapping region are associated with the work area that has the lower index.