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: Macintosh Toolbox Essentials /
Chapter 6 - Dialog Manager / Dialog Manager Reference
Dialog Manager Routines / Manipulating Items in Alert and Dialog Boxes


ShortenDITL

To remove items from an existing dialog box while your application is running, use the ShortenDITL procedure.

PROCEDURE ShortenDITL (theDialog: DialogPtr; 
                       numberItems: Integer);
theDialog
A pointer to a dialog record.
numberItems

The number of items to remove (starting from the last item in the item
list resource).
DESCRIPTION
The ShortenDITL procedure removes the specified number of items from the dialog box. This procedure is especially useful if several dialog boxes share a single item list resource, because you can use ShortenDITL to remove items as necessary for individual dialog boxes.

You typically create an invisible dialog box, call the ShortenDITL procedure, then make the dialog box visible by using the Window Manager procedure ShowWindow. Note that ShortenDITL does not automatically resize the dialog box; you can use
the Window Manager procedure SizeWindow if you need to resize the dialog box.

SPECIAL CONSIDERATIONS
The ShortenDITL procedure is available in System 7 and in earlier versions of the Communications Toolbox. Before calling ShortenDITL, you should make sure that it
is available by using the Gestalt function with the gestaltDITLExtAttr selector. Test the bit indicated by the gestaltDITLExtPresent constant in the response parameter. If the bit is set, then ShortenDITL is available.

SEE ALSO
You can use the CountDITL function, described next, to determine the number of items in the dialog box's item list resource. See the chapter "Window Manager" in this book
for information on the ShowWindow and SizeWindow procedures. The Gestalt function is described in the chapter "Gestalt Manager" in Inside Macintosh: Operating System Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996