g:text.top Property

Gets or sets the number of pixels from the top edge of the gadget to position the g:text element.

This property is read/write.

Syntax

propVal = g:text.top(intTop)

  
g:text.top(intTop)

   = propVal 

Parameters

intTop [in]
intTop [out]

Sets or retrieves the position, in pixels, of the target element from the top edge of the gadget.

Remarks

This value overrides any positioning declared previously.

Examples

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

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

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: