Skip to main content

VisFontNameComboBox

Namespace: PPJ.Runtime.Vis

Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)

Lists installed font names in a combo box.

public class VisFontNameComboBox : VisComboBoxBase

Example:

using (var list = new PPJ.Runtime.Vis.VisFontNameComboBox())
{
list.Populate(PPJ.Runtime.Vis.Vis.FONTTYPE_TrueType);
}

Constructors

Instance member VisFontNameComboBox()

Initializes the font name combo box and its default behavior.

Methods

Static member FromHandle(handle)

Resolves this control type from a native window handle.

ParameterTypeDescription
handleSalWindowHandleThe native control handle.

Returns: VisFontNameComboBox. The associated VisFontNameComboBox, or null when no managed control owns the handle.

A handle belonging to a different managed control type causes an InvalidCastException.

Instance member GetSelectedFont(fontName, fontType)

Gets the selected font name and the compatibility font-type value.

ParameterTypeDescription
fontName by referenceSalStringReceives the selected item text; unchanged when no item is selected.
fontType by referenceSalNumberReceives FONTTYPE_TrueType; unchanged when no item is selected.

Returns: SalBoolean. True when an item is selected; otherwise, false.

The reported type is always FONTTYPE_TrueType and is not detected from the font.

Instance member Populate(fontType)

Replaces the list with all installed font names.

ParameterTypeDescription
fontTypeSalNumberReserved for compatibility; this implementation does not filter by font type.

Returns: SalNumber. The number of installed font names added.

Implements

NameDescription
ISalControl
ISalEditControl
ISalListControl
ISalWindow