GUI

guiFontIcon

Describe a control picture taken from an icon font

Syntax

Signature
guiFontIcon():New( cFile, nCode, [nColor], [nSize] ) --> oFontIcon
guiFontIcon() --> oFontIconClass

Arguments

Arguments are described by the signatures above. Positions and sizes are logical pixels. Optional arguments in brackets use the defaults described below.

Return value

Constructors return the new object unless the syntax states otherwise. Methods returning the object may be chained.

Description

Class members declared by guiFontIcon:

- Instance variables: file (read/write), code (read/write), color (read/write), size (read/write) - Properties: none - Methods: New()

The object describes character nCode of the font file cFile as a square picture. nColor is 0xRRGGBB; NIL keeps the system text color. The default size is 24 pixels. Pass the object where the sidebar accepts a bitmap.

The exported properties are file, code, color and size. A color of -1 means the system text color.

Notes

guiFontIcon is part of the gui user library for Windows.

Example

guiFontIcon.prg
PROCEDURE Main()

   LOCAL oFontIcon := guiFontIcon():New( "icons.ttf", 0xE8B6, 0x336699, 24 )

   QOut( oFontIcon:file )

RETURN

Output

See also