Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 4 - List Manager / List Manager Reference
List Manager Routines / Changing the Size of Cells and Lists


LSize

You can change the size of a list by using the LSize procedure. Usually, you need to do this only after calling the Window Manager procedure SizeWindow.

PROCEDURE LSize (listWidth: Integer; listHeight: Integer; 
                 lHandle: ListHandle);
listWidth
The new width (in pixels) of the list's visible rectangle.
listHeight
The new height (in pixels) of the list's visible rectangle.
lHandle
The list whose size is being changed.
DESCRIPTION
The LSize procedure adjusts the lower-right side of the list specified by the lHandle parameter so that the list's visible rectangle is the width and height specified by the listWidth and listHeight parameters.

Because the list's visible rectangle does not include room for the scroll bars, your application should make listWidth 15 pixels less than the desired width of the list if it contains a vertical scroll bar, and it should make listHeight 15 pixels less than the desired height of the list if it contains a horizontal scroll bar.

The contents of the list and the scroll bars are adjusted and redrawn as necessary. However, LSize does not draw a border around the list's rectangle. Also, it does not erase any portions of the old list that may still be visible. However, this approach should not be a problem if your application only calls LSize after the user resizes a window containing a list in its lower-right corner.

SPECIAL CONSIDERATIONS
You should not call the LSize procedure from within an interrupt, such as in a completion routine or VBL task.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the LSize procedure are
Trap macroSelector
_Pack0$0060

SEE ALSO
For information on the Window Manager's SizeWindow procedure, see the chapter "Window Manager" in Inside Macintosh: Macintosh Toolbox Essentials.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996