XWidgetSoft Forum https://xwidget.com/bbs/ |
|
[SOLVED] Change color of a roundline by script ?? https://xwidget.com/bbs/viewtopic.php?f=8&t=5565 |
Page 1 of 1 |
Author: | rafgeraedts [ March 28th, 2015, 10:31 am ] |
Post subject: | [SOLVED] Change color of a roundline by script ?? |
Hi, I am trying to change the color of a roundline by script. I've been using this line of code : roundline1.fore.draw.solidcolor.color = rgba(150,150,150,255); Unfortunately, it doesn't work ... anybody has an idea ? Thanks in advance ! |
Author: | Jimking [ March 28th, 2015, 10:35 am ] |
Post subject: | Re: Change color of a roundline by script ?? |
No need to use script for this! The designer has all the necessary color options . ![]() All the available options are under the "Fill Color" tab. |
Author: | rafgeraedts [ March 28th, 2015, 11:48 am ] |
Post subject: | Re: Change color of a roundline by script ?? |
Thanks jimking, but I'm making a disk widget where the color of the roundline changes dynamicly with the disk percentage. I see no other way than to use script ... ? |
Author: | meme [ March 28th, 2015, 12:51 pm ] |
Post subject: | Re: Change color of a roundline by script ?? |
Try roundline1.fore.solidcolor.color = rgba(0,0,255,255); // for the fore, don't forget to tick enable solid color roundline1.back.color = rgba(0,0,255,255); // for the back |
Author: | Jimking [ March 28th, 2015, 1:23 pm ] |
Post subject: | Re: Change color of a roundline by script ?? |
Could you pls upload a screenshot from what you want to do? Because the designer has the option to add gradient colors.. It will be also useful to upload your xwp to check it.. |
Author: | digigamer [ March 29th, 2015, 9:48 pm ] |
Post subject: | Re: Change color of a roundline by script ?? |
You are doing it wrong the property is roundline1.fore.color = rgba(120,120,120,255) |
Author: | rafgeraedts [ March 31st, 2015, 4:33 am ] | ||
Post subject: | Re: Change color of a roundline by script ?? | ||
Hi guys, Thanks for your input, it was really useful ! Digigamer, your peace of code did it !! Although I changed my initial plan and went for gradient instead, but same thing : roundline1.fore.gradient.stopcolor = rgba(255,0,0,255); Attached is a screenshot of the final result. My 9 hard drives color-coded to 50% green, then to 75% yellow and red above 75%. When mouse over the disk name, the full name appears on top. ![]()
|
Author: | Jimking [ March 31st, 2015, 9:54 am ] |
Post subject: | Re: Change color of a roundline by script ?? |
Great! When the widget is ready please post it in the "Share your creations" ![]() (use the attach option to upload the .xwp file) |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |