System.Gadget.name Property

Gets the gadget name as specified in the gadget manifest file.

This property is read-only.

Syntax

propVal = System.Gadget.name()

  

Parameters

  • strName [out]
    Retrieves the name of the gadget.

Remarks

A gadget must have a name specified in the gadget manifest file in order to be displayed in the Gadget Picker.

Examples

The following example demonstrates how to get the name of a gadget from the gadget manifest.

// The gadget manifest.
<gadget>
  <name>SDK Docked</name>
  ...
</gadget>

// The gadget HTML file with inline script.
<html>
<head>
  <script>
    var mytext = "Gadget Name: " + System.Gadget.name;

    function setContentText()
    {
      gadgetContent.innerText = mytext;
    }
  </script>
</head>
<body onload="setContentText()">
  <span id="gadgetContent" style="font-family: Verdana; font-size: 20px;">name</span>
</body>
</html>

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

System.Gadget

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK