Important: The information in this document is obsolete and should not be used for new development.
SetDialogFont
Although you generally should not change the font used in static and editable text items, you can do so with theSetDialogFont
procedure. TheSetDialogFont
procedure is also available as theSetDAFont
procedure.
PROCEDURE SetDialogFont (fontNum: Integer);
fontNum
- A font ID number. Do not rely on font number constants. Instead, use
the Font Manager functionGetFNum
to find the font number to pass in this parameter.DESCRIPTION
For subsequently created dialog and alert boxes,SetDialogFont
sets the font of the dialog or alert box's graphics port to the specified font. If you don't call this procedure, the system font is used. TheSetDialogFont
procedure does not affect titles of controls, which are always displayed in the system font.SPECIAL CONSIDERATIONS
There are a number of caveats regarding theSetDialogFont
procedure.First, the Standard File Package does not always properly calculate the position of the standard file dialog box once this procedure has been called; for example, the standard file dialog box may be partially obscured by a menu bar. Second, be aware that this procedure affects all static text and editable text items in all of the alert and dialog boxes you subsequently display. Third,
SetDialogFont
does not change the font for control titles. Fourth, you can't useSetDialogFont
to change the font size or font style. Finally, and most importantly, your application will be much easier to localize if you always use the system font in your alert and dialog boxes and never useSetDialogFont
.SEE ALSO
See the chapter "Font Manager" in Inside Macintosh: Text for information about theGetFNum
function.