method fontDialog

object fontDialog(scene scene,string initFontName,uint32 fontSize);

Argumente

Zurückgegebener Wert

This method presents a system font chooser. The method returns current font information selected in a basics::dictionary. If the dialog is canceled the basics::dictionary will be empty.
The dictionary keys are:
function onFontDialog()
{
    // Open Font dialog with inital font name Times New Roman, and size 14.
    var fontDictionary = appUtils.fontDialog(scene, "Times New Roman", 14);
    if (fontDictionary)
    {
        // Get a list of all the keys.
        var keyList = fontDictionary.allKeys();
        var count   = keyList.count;
        for (var i = 0; i < count; ++i)
        {
            // Iterate thru all the keys getting the value.
            var key   = keyList.getValue(i);
            var value = fontDictionary.valueForKey(key);
            if (key == "rgbColors")
                shell.print("key = " + key + "  value = 0x" + value.toString(16).toLowerCase());
            else
                shell.print("key = " + key + "  value = " + value);
        }
    }
}