Important: The information in this document is obsolete and should not be used for new development.
Using the List Manager
This section explains how you can take advantage of the List Manager's features and how you can customize lists that your application creates by providing support for features not built into the List Manager. In particular, this section explains how you can
- use the
LNew
function and theLDispose
procedure to create a list within a rectangle in a window and then dispose of that list- add rows and columns to a list by using the
LAddColumn
andLAddRow
functions along with theLSetCell
procedure; delete them by using theLDelColumn
andLDelRow
procedures; and temporarily disable drawing of a list while adding multiple columns or rows by using theLSetDrawingMode
procedure- call the
LClick
function to let the List Manager automatically respond to mouse clicks in a list by scrolling the list and changing the selection as appropriate; and call theLUpdate
andLActivate
procedures to respond to update and activate events- use the
LGetSelect
function and theLSetSelect
procedure to get information about which cells are selected or to change the selection; and use theLAutoScroll
andLScroll
procedures to scroll to a particular cell- customize the algorithm that the List Manager uses to highlight cells in response to a mouse click by modifying the
selFlags
field of the list record- manipulate list items by using the
LAddToCell
,LClrCell
,LGetCellDataLocation
, andLGetCell
procedures- search through a list for a particular item by using the
LSearch
function and writing a custom match function- respond to arrow-key and other key-down events to change or extend the selection
- manage multiple lists within the same window or dialog box by drawing an outline around the list that would be affected by keyboard input using the
refCon
field of the list record to link the lists- write your own list definition procedure
Subtopics
- Creating a List
- Adding Rows and Columns to a List
- Responding to Events Affecting a List
- Working With List Selections
- Customizing Cell Highlighting
- Manipulating List Cells
- Searching a List for a Particular Item
- Supporting Keyboard Navigation of Lists
- Outlining the Current List
- Writing Your Own List Definition Procedure