次の方法で共有


text.align property

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Gets or sets the text alignment.

This property is read/write.

Syntax

ialign = text.align
text.align = ialign

Property value

An Integer that specifies or receives the text alignment.

(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 [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008
Header
Safeint.h
IDL
Sidebar.idl
DLL
Sidebar.Exe (version 1.00 or later)

See also

Reference

background

image

text