<< Click to Display Table of Contents >> FontNames (collection) |
Access path: Application à FontNames
1 Description
FontNames is a collection of all fonts installed in Windows. The individual elements of this collection are of the type FontName.
2 Access to the collection
There is exactly one instance of the FontNames collection during the whole runtime of TextMaker. It is accessed through Application.FontNames:
' Display the name of the first installed font
MsgBox tm.Application.FontNames.Item(1).Name
' The same, but shorter, omitting the default properties:
MsgBox tm.FontNames(1)
3 Properties, objects, collections and methods
Properties:
▪Count R/O
Objects:
▪Item → FontName (default object)
▪Application → Application
▪Parent → Application
Count (property, R/O)
Data type: Long
Returns the number of FontName objects in TextMaker – in other words: the number of fonts installed in Windows.
Item (pointer to object)
Data type: Object
Returns an individual FontName object, i.e. an individual installed font.
Which FontName object you get depends on the numeric value that you pass to Item: 1 for the first installed font, 2 for the second, etc.
Application (pointer to object)
Data type: Object
Returns the Application object.
Parent (pointer to object)
Returns the parent object, i.e. Application.