LabWindows/CVI

Content Type
Programming Language
Current manual

FontSelectPopupEx

FontSelectPopupEx

int FontSelectPopupEx (char title[], char sampleText[], int monospacedFontsOnly, char typefaceName[], int *bold, int *underline, int *strikeOut, int *italic, int *justification, int *textColor, int *angle, int *characterSet, int *fontSize, int minimumFontSize, int maximumFontSize, int showDefaultButton, int allowMetaFonts);

Purpose

Opens a pop-up dialog box in which a user can specify font settings. FontSelectPopupEx is similar to FontSelectPopup, except that FontSelectPopupEx provides angle and charSet parameters.

If the user cancels out of the pop-up dialog box or an error occurs, the function does not modify any of the input or output parameters.

Note Note  You can pass 0 to any of the output parameters to hide the selection of that parameter in the font pop-up dialog box.

Parameters

Input
Name Type Description
title char [] Title of the dialog box.
sampleText char [] Sample text to display in the pop-up dialog box as demonstration of how the settings affect the appearance of text.
monospacedFontsOnly int Specify a nonzero value or select On in the function panel to list only monospaced, fixed width fonts.

Specify 0 or select Off in the function panel to list all fonts.
minimumFontSize int Minimum value allowed in the Size control.
maximumFontSize int Maximum value allowed in the Size control.
showDefaultButton int Specifies whether to add a default button to the font pop-up dialog box. When the user presses the Default button, the controls on the font pop-up dialog box change to the values you specified in your most recent call to SetFontPopupDefaults or SetFontPopupDefaultsEx.

Specify a nonzero value or select On in the function panel to add a default button.

Specify 0 or select Off in the function panel to omit the default button.
allowMetaFonts int Specify a nonzero value or select On in the function panel to list the NI-supplied metafonts in the font pop-up dialog box.

Specify 0 or select Off in the function panel to omit the metafonts from the font pop-up dialog box.
Output
Name Type Description
typefaceName char [] On input, the typeface name, such as Courier, that initially appears in the Font ring control.

On output, the typeface name the user selects. The buffer must be at least 256 bytes long.

Pass 0 to hide the Font ring control and prevent the user from changing the typeface.
bold int On input, the value that initially appears in the Bold checkbox.

On output, the final value in the Bold checkbox.

Pass 0 to hide the Bold checkbox.
underline int On input, the value that initially appears in the Underline checkbox.

On output, the final value in the Underline checkbox.

Pass 0 to hide the Underline checkbox.
strikeOut int On input, the value that initially appears in the Strikeout checkbox.

On output, the final value in the Strikeout checkbox.

Pass 0 to hide the Strikeout checkbox.
italic int On input, the value that initially appears in the Italic checkbox.

On output, the final value in the Italic checkbox.

Pass 0 to hide the Italic checkbox.
justification int On input, the value that initially appears in the Justification ring control.

On output, the final value in the Justification ring control.

Valid values for this parameter are as follows:

VAL_LEFT_JUSTIFIED
VAL_RIGHT_JUSTIFIED
VAL_CENTER_JUSTIFIED


Note   Not all text can be justified. For example, text in a text box can be justified, but the text in a panel title cannot.

Pass 0 to hide the Justification ring control.
textColor int On input, the value that initially appears in the Text Color control.

On output, the final value in the Text Color control.

textColor is a 4-byte RGB value. An RGB value is an integer in the hexadecimal format 0x00RRGGBB, where RR, GG, and BB are the respective red, green, and blue components of the color value.

Pass 0 to hide the Text Color control.
angle int On input, the value that initially appears in the Angle control.

On output, the final value in the Angle control.

angle is in tenths of a degree.

Pass 0 to hide the Angle control.

Linux The available values for this control are 0, 900, 1800, and 2700.
characterSet int On input, the value that initially appears in the Character Set control.

On output, the final value in the Character Set control.

Pass 0 to hide the Character Set control.

(Linux) This parameter is ignored, and the control does not appear on font selection pop-up dialog boxes.
fontSize int On input, the value that initially appears in the Size control.

On output, the final value in the Size control.

Specify fontSize in units of points.

Pass 0 to hide the Size control.

Return Value

Name Type Description
selectionStatus int The selection status or error codes generated during the function call.

0 User canceled out of dialog box.
1 User modified the settings.

Negative values indicate that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 9.0 and later

Was this information helpful?