Important: The information in this document is obsolete and should not be used for new development.
HideDialogItem
Although you should rarely need to do so, you can make an item in a dialog box invisible by using theHideDialogItemprocedure. TheHideDialogItemprocedure is also available as theHideDItemprocedure.
PROCEDURE HideDialogItem (theDialog: DialogPtr; itemNo: Integer);
- theDialog
- A pointer to a dialog record.
itemNo- A number corresponding to the position of an item in the dialog box's item list resource.
DESCRIPTION
TheHideDialogItemprocedure hides the item specified byitemNoby giving it a display rectangle that's off the screen. Specifically, if the left coordinate of the item's display rectangle is less than 8192 (hexadecimal $2000),HideDialogItemadds 16,384 (hexadecimal $4000) to both the left and right coordinates of the rectangle. If the item is already hidden (that is, if the left coordinate is greater than 8192),HideDialogItemdoes nothing. To redisplay an item that's been hidden byHideDialogItem, you can use theShowDialogItemprocedure.SPECIAL CONSIDERATIONS
If your application needs to display a number of dialog boxes that are similar except for one or two items, it's generally easier to modify the common elements using theAppendDITLandShortenDITLprocedures than to use theHideDialogItemandShowDialogItemprocedures.The rectangle for a static text item must always be at least as wide as the first character of the text.
You generally shouldn't use
HideDialogItemto make an editable text item invisible, because as the user presses the Tab key, the Dialog Manager attempts to move the cursor to the hidden editable text item, where the user's subsequent keystrokes will be placed.