Important: The information in this document is obsolete and should not be used for new development.
LAddColumn
You can use theLAddColumnfunction to add one or more columns to a list.
FUNCTION LAddColumn (count: Integer; colNum: Integer; lHandle: ListHandle): Integer;
count- The number of columns to add.
colNum- The column number of the first column to add.
lHandle- The list to which to add the columns.
DESCRIPTION
TheLAddColumnfunction inserts into the given list the number of columns specified by thecountparameter, starting at the column specified by thecolNumparameter. TheLAddColumnfunction returns as its function result the column number of the first column added, which is equal to the value specified by thecolNumparameter if that value is a valid column number.If the column number specified by
colNumis not already in the list, then new last columns are added. The value returned by theLAddColumnfunction thus has significance only in this case.
Columns whose column numbers are initially greater than
- WARNING
- If there is insufficient memory in the heap to add the new columns, the
LAddColumnfunction may fail to add the new columns although it returns a positive function result. Be sure there is enough memory in the heap to allocate the new columns before callingLAddColumn.![]()
colNumhave their column numbers increased bycount.If the automatic drawing mode is enabled and the columns added by
LAddColumnare visible, then the list (including its scroll bars) is updated. New cells created by a call toLAddColumnare initially empty.You may add columns to a list that does not yet have rows. The
dataBoundsfield of the list record reflects that the list has columns, but you can only access cells when both rows and columns have been added.SPECIAL CONSIDERATIONS
You should not call theLAddColumnfunction from within an interrupt, such as in a completion routine or VBL task.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theLAddColumnfunction are
Trap macro Selector _Pack0 $0004