Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Gadgets
Windows Sidebar
background
Methods
 removeObjects Method
removeObjects Method

Removes all g:text and g:image elements added to the gadget background using the addTextObject and addImageObject methods.

Syntax

g:background.removeObjects()

Return Value

No return value.

Remarks

The initial background image is unaffected.

Example

The following example demonstrates how to add both g:text and g:image elements to a g:background and then remove them using the removeObjects method

\\ Add g:text and g:image elements to the g:background element.
\\ imgBackground is the value of the 'id' attribute for the g:background element.
var imgGlow = imgBackground.addImageObject("file://img.png", 0, 0);
var txtShadow = imgBackground.addTextObject("test", "Verdana", 25, "Red", 50, 50);

\\ Remove all text and image elements, leaving the initial background image unchanged.
imgBackground.removeObjects();

Applies To

g:background

See Also

g:image, g:text
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker