Author Topic: Windows 7 Desktop gadget  (Read 691 times)

mancinip

  • Newbie
  • *
  • Posts: 17
Windows 7 Desktop gadget
« on: April 29, 2010, 09:44:20 PM »
I recently made a vey simple Win7 desktop gadget to display the output from my temperature probe and thought I'd share it.

Start by creating a folder in \Program Files\Windows Sidebar\Gadgets.  The folder should be named <Gadget name>.Gadget.  For this example I used Temperature.Gadget.  There are two files you need to place in this folder.  First is an XML file called gadget.xml.  Here is my example (the name parameter should match the name you used in the folder name):
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
  <name>Temperature</name>
  <version>1.0.0.0</version>
  <hosts>
    <host name="sidebar">
      <base type="HTML" apiVersion="1.0.0" src="Temperature.html" />
      <permissions>FULL</permissions>
      <platform minPlatformVersion="1.0" />
    </host>
  </hosts>
</gadget>

The second file is <Gadgetname>.html.  Here is my example (Temperature.html):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=unicode" />
<style type="text/css">
body{
margin: 0;
width: 300px;
height:30px;
font-family: Georgia;
}
#gadgetContainer{
margin-top:6px;
width:300px;
height:30px;
}
</style>
</head>
<body>
<div id="gadgetContainer">
   Current Temperature: <Copy and paste your widget script here>
</div>
</body>
</html>

This is a very bare-bones gadget.  Feel free to dress up the HTML to make a better looking gadget.
« Last Edit: April 29, 2010, 09:46:37 PM by mancinip »

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Windows 7 Desktop gadget
« Reply #1 on: May 03, 2010, 04:47:42 PM »
Very cool.

I am going to add this to the Wiki projects, so others can find this. It's very useful.

Here is a Google Desktop Gadget we just created:

http://www.iobridge.net/wiki/projects/google-desktop-gadget

This gadget displays a value from an ioBridge widget.

« Last Edit: May 03, 2010, 04:59:38 PM by iobridge »
ioBridge Support
Community Team

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Windows 7 Desktop gadget
« Reply #2 on: May 04, 2010, 03:17:27 AM »
I just added your Windows sidebar gadget to the Wiki as well. Thanks for the contribution.

Here's the link:

http://www.iobridge.net/wiki/projects/windows-gadget

« Last Edit: May 04, 2010, 03:24:37 AM by iobridge »
ioBridge Support
Community Team