Skip to main content

VisFontNameListBox

Namespace: PPJ.Runtime.Vis

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

Lists installed font names in a list box.

public class VisFontNameListBox : VisListBoxBase

Example:

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

Constructors

Instance member VisFontNameListBox()

Initializes the font name list 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: VisFontNameListBox. The associated VisFontNameListBox, 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(type)

Replaces the list with all installed font names.

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

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

Implements

NameDescription
ISalControl
ISalListControl
ISalWindow