Chapter Contents

Previous

Next
FONTSEL

FONTSEL



Opens the selector window for host fonts or for portable fonts

Category: Selection List


Syntax
Details
Example
See Also

Syntax

newfontlist-id=FONTSEL(oldfontlist-id,font-selector);

newfontlist-id
contains the identifier of the list that contains the selected font family, size, weight, and style.

Type: Numeric

oldfontlist-id
contains the identifier of the list that contains the font information for the selection list. An invalid oldfontlist-id produces an error condition. This list can be empty.

Type: Numeric

font-selector
specifies which font selector window to open:

'Y'
the host font selector window

'N'
the portable font selector window

'H'
the portable font selector window, displaying only the hardware fonts

' ' (blank)
the default font selector window

Type: Character


Details

If oldfontlist-id is not empty, then the selector window opens with the font family, size, weight, and style selections that are specified in the list. If oldfontlist-id is an empty list, then the selector window opens with the default selections for font family, size, weight, and style. The newfontlist-id identifier contains information about the font family, size, weight, and style that the user selected.

The host font selector window enables a user to select fonts that are available on the host in an environment-specific way. The portable font selector window enables a user to select a portable font specification, which is used to find the closest match among fonts that are available on a host. The host font selector window can also be opened from the portable font selector window by using the System button.

For more information about how to use the font information that is returned, see the documentation for the extended text entry class in SAS/AF software and its _setFont method.

To change the default font selector window, use the SAS system option MULTENVAPPL, which is described in SAS Language Reference: Dictionary.


Example

Make a FRAME entry with a pushbutton control named PUSHBTN and a Version 8 text entry control named TEXTENTRY1. Clicking on the pushbutton executes the code to display the portable font selector window. Change the font selector value from N to Y to use the host font selector window.

INIT:
    fontid=makelist();
return;
PUSHBTN:
    fontid=fontsel(fontid,'n');
    rc=putlist(fontid,'FONT',1);
    textentry1.font=fontid;
return;
TERM:
    rc=dellist(fontid);
return;

See Also

MAKELIST


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.