g:image.opacity Property

Gets or sets the opacity of the g:image element.

This property is read/write.

Syntax

propVal = g:image.opacity(intOpacity)

  
g:image.opacity(intOpacity)

   = propVal 

Parameters

  • intOpacity [in]

  • intOpacity [out]
    Sets or retrieves the opacity the target element. The value ranges from 0 to 100.

    Value Meaning
    0

    The target element is completely transparent.

    100

    Default. The target element is completely opaque.

     

Remarks

The opacity can be specified in the gadget HTML and script files.

Examples

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

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var imgOpacity = imgBackground.addImageObject(file, intX, intY);
imgOpacity.opacity = 1.0;

The following example demonstrates how to set the opacity of the g:image element in the gadget HTML file.

<g:image src="..\aerologo.png" opacity="0"/>

See Also

g:image

Reference

background

text

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK