Export (0) Print
Expand All

g:text.width Property

Gets or sets the width of the g:text element.

This property is read/write.

Syntax

propVal = g:text.width(intWidth)

  
g:text.width(intWidth)

   = propVal 

Parameters

intWidth [in]
intWidth [out]

Sets or retrieves the width, in pixels, to scale the target element.

Examples

The following example demonstrates how to set the width of the g:text element from a gadget script file.

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

See Also

g:text
Reference
background
image

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK

Community Additions

Show:
© 2014 Microsoft