XWidgetSoft Forum
https://www.bbs.xwidget.com/

Flashing graphics within xwidget
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=3194
Page 1 of 1

Author:  Cov [ June 5th, 2013, 8:14 pm ]
Post subject:  Flashing graphics within xwidget

Hi,

I'm looking for a way of how to make the arrows for Up- & Download lighten up as soon as network traffic is being detected.
In the example below you see the arrow for Upload lightning up as long as data transfer is active.
How do we make this feature work in xwidget please?

Image

Thanks
Image

Author:  Armando [ June 7th, 2013, 1:59 pm ]
Post subject:  Re: Flashing graphics within xwidget

Attachment:
netwidget.XWidgetPkg [6.57 KiB]
Downloaded 365 times

Tell me if this serves you. Quite simply shows a picture whenever the values ​​change ("on change"). But: the "light" comes on when the value changes up or down. I do not know if that's. In any case, would have to write a code to change only when the value increases.
I use this function "on change" for lot of things.

Code:
function downtextOnChange(Sender)
{
up.visible = true;
sleep (100)
up.visible = false;
}

function uptextOnChange(Sender)
{
down.visible = true;
sleep (100)
down.visible = false;
}

Author:  Cov [ June 7th, 2013, 2:14 pm ]
Post subject:  Re: Flashing graphics within xwidget

Hi Armando,

that's pretty awesome!
Thank you very much!

If possible, I would prefer a constant "light" as long as data transfer is active.
Only if data transfer is down to zero, the light should go off.

Do you think that's possible?
Thanks!
Image

Author:  Jimking [ June 7th, 2013, 2:28 pm ]
Post subject:  Re: Flashing graphics within xwidget

Cov, you will not rest until someone makes it!! :lol:

Author:  Cov [ June 7th, 2013, 2:32 pm ]
Post subject:  Re: Flashing graphics within xwidget

That's because I love widgets so much! Image

Author:  Armando [ June 7th, 2013, 2:43 pm ]
Post subject:  Re: Flashing graphics within xwidget

Yes, it's easy,
give me some minutes... :)

Author:  Cov [ June 7th, 2013, 3:01 pm ]
Post subject:  Re: Flashing graphics within xwidget

Armando wrote:
Yes, it's easy
See Mr. jimking? It's easy! Image

Author:  Armando [ June 7th, 2013, 3:25 pm ]
Post subject:  Re: Flashing graphics within xwidget

This would works, but... for some reason doesn't works...



Code:
function uptextOnChange(Sender)
{
  if(uptext.text==0)
    {
    up.visible = false;
     }
 else
     {
    up.visible = true;
      }
}

function downtextOnChange(Sender)
{
 if(downtext.text==0)
    {
    down.visible = false;
     }
 else
     {
    down.visible = true;
      }
}

Author:  Cov [ June 7th, 2013, 3:31 pm ]
Post subject:  Re: Flashing graphics within xwidget

Armando wrote:
This would works, but... for some reason doesn't works...

Oh! haha, never mind.
Thank you very much for trying! Image

Author:  meme [ June 9th, 2013, 3:07 pm ]
Post subject:  Re: Flashing graphics within xwidget

Same topic with solution http://bbs.xwidget.com/viewtopic.php?f=7&t=3193

Author:  Cov [ June 10th, 2013, 1:23 am ]
Post subject:  Re: Flashing graphics within xwidget

Thanks a lot!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/