Solutionworx Posted April 10, 2012 Report Share Posted April 10, 2012 I have created a digital dial gadget with a SQL backend. How do I make the gadget change color based on the number displayed? Thanks Quote Link to comment Share on other sites More sharing options...
dijikul Posted September 12, 2012 Report Share Posted September 12, 2012 I've managed to make this work, but it depends. How are you creating your gadgets? With the PowerGadget creator I have, it doesn't write the proper XML tags required for it to pickup the Color property you feed it with PowerShell, however I have some older gadgets that I've been copy and pasting the code with. It basically works like this: You create an object in PowerShell that you store the gadget's properties in. I use basic digital gauges that have the Stat, and the Color. You first pull your data with PowerShell, then run it through some if statements to determine what you want to set your Color property to, using the add-member cmdlet to add it to your object. With the older version of PowerGadgets, it appears you could just write-output $PowerGadgetObject and it would work, but now as mentioned earlier, with my creator, I'm unable to create the required XML tags within the PGF file without manually edits to the text. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.