g:text.color Property

Gets or sets the text color.

This property is read/write.

Syntax

propVal = g:text.color(strColor)

  
g:text.color(strColor)

   = propVal 

Parameters

strColor [in]
strColor [out]

Sets or retrieves the named Windows color applied to the target element.

Remarks

The Windows Sidebar color names match the Microsoft .NET Framework version 1.0, Windows Forms, and Microsoft Internet Explorer color names. This representation is based on UNIX X11 named color values.

The following image shows each predefined color, its name, and its hexadecimal value.

 

Predefined Windows color names

 

Examples

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

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

Requirements

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

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: