g:text.align Property
Gets or sets the text alignment.
This property is read/write.
Syntax
propVal = g:text.align(intAlignment)
g:text.align(intAlignment)
= propVal
Parameters
intAlignment [in]
intAlignment [out]
Sets or retrieves the text alignment.Value Meaning 0 Default. Based on Sidebar alignment. Text is aligned right when the Sidebar is anchored to the right and aligned left when the Sidebar is anchored to the left.
1 Center.
2 Left.
4 Right.
Examples
The following example demonstrates how to align a g:text element from a gadget script file.
\\ imgBackground is the value of the 'id' attribute for the g:background element.
var txtAlign = imgBackground.addTextObject("test", "Verdana", 25, "Red", intX, intY);
txtAlign.align = 1;
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
Reference
Send comments about this topic to Microsoft
Build date: 2/24/2010
Build type: SDK