g:text.fontsize Property

Gets or sets the font size.

This property is read/write.

Syntax

propVal = g:text.fontsize(strFont)

  
g:text.fontsize(strFont)

   = propVal 

Parameters

strFont [in]
strFont [out]

Sets or retrieves the size of the font applied to the target element.

ValueMeaning
12

Default. If the font size is not available for the font specified.

 

Remarks

Important  For Windows 7, when the new <autoscaleDPI> element of the gadget manifest is set to true (for high-DPI support) gadgets should explicitly specify a text size.

Examples

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

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var txtSize = imgBackground.addTextObject("test", "Verdana", 25, "Red", intX, intY);
txtSize.fontsize = 12;

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
IDLSidebar.idl
DLLSidebar.Exe version 1.00 or later

See Also

g:text
Reference
image
background

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK

Community Additions

Show: