g:text.font Property

Gets or sets the font name.

This property is read/write.

Syntax

propVal = g:text.font(strFont)

  
g:text.font(strFont)

   = propVal 

Parameters

  • strFont [in]

  • strFont [out]
    Sets or retrieves the name of the font applied to the target element.

    Value Meaning
    Times New Roman

    Default. If the font is not installed on the system or no font is specified.

     

Examples

The following example demonstrates how to assign a font name to the g:text element from a gadget script file.

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var txtFont = imgBackground.addTextObject("test", "Verdana", 25, "Red", intX, intY);
txtFont.font = "Times New Roman";

Requirements

Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
IDL Sidebar.idl
DLL Sidebar.Exe version 1.00 or later

See Also

g:text

Reference

background

image

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK