Carbon


LDelRow

Header: Lists.h Carbon status: Supported

Deletes one or more rows from a list.

void LDelRow (
    SInt16 count, 
    SInt16 rowNum, 
    ListHandle lHandle
);
Parameter descriptions
count

The number of rows to delete, or 0 to delete all rows.

rowNum

The row number of the first row to delete.

lHandle

The list from which to delete the rows.

DISCUSSION

This function deletes rows starting at the row specified by the rowNum parameter. If the row specified by rowNum is invalid, then nothing is done.

Your application can quickly delete all rows from a list (and thus delete all cell data) simply by setting the count parameter to 0. The number of columns is left unchanged. Your application can achieve the same effect by setting the rowNum parameter to (**lHandle).dataBounds.top and setting the count parameter to a value greater than (**lHandle).dataBounds.bottom – (**lHandle).dataBounds.top.

Rows whose row numbers are initially greater than rowNum have their row numbers decreased by count.

If the automatic drawing mode is enabled and one or more of the rows deleted by the function are visible, then the list (including its scroll bars) is updated.

SPECIAL CONSIDERATIONS

This function is contained in a resource of resource type 'PACK'. Calling it could result in the loading of the package resource and the allocation of memory. Thus, your application should not call this function from within an interrupt, such as in a completion function or VBL task.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)