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

How to create a widget that opens a picture and refreshes?
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=60
Page 1 of 1

Author:  jpdp [ July 6th, 2012, 5:27 am ]
Post subject:  How to create a widget that opens a picture and refreshes?

Hi,
I am really new to xwidget and it looks really cool.
I can't seem to find much documentation.
I want to build a widget which opens an image from a server. That image, with the same name name will be overwritten every few minutes. Similar to an album, but with the same image.

Author:  Tony [ July 6th, 2012, 4:16 pm ]
Post subject:  Re: How to create a widget that opens a picture and refreshe

Thanks for your feedback
I will add a DownloadFileCore in next version of XWidget, then you can just set the picture file URL to the DownloadFileCore and image binding this core and select tag %filepath

Author:  Totoro [ October 23rd, 2012, 8:59 am ]
Post subject:  Re: How to create a widget that opens a picture and refreshe

My Question similar, I'd like to open a (program/file) (which is in the same folder) as the current image(photo)... With a different program.
I know i cannot have any spaces between text, is there a work around for that?

Many tanks newbie

Author:  dimmas375 [ January 10th, 2013, 6:54 am ]
Post subject:  Re: How to create a widget that opens a picture and refreshe

jpdp wrote:
Hi,
I am really new to xwidget and it looks really cool.
I can't seem to find much documentation.
I want to build a widget which opens an image from a server. That image, with the same name name will be overwritten every few minutes. Similar to an album, but with the same image.

You can do that using HTML Panel and some of HTML and JavaScript code.
For example:
Code:
<img alt="Pic from my server" style= "border:0;position:absolute;left:0px;top:0px" src="http://myserver.net/Pic_latest.png">

<script type="text/javascript">

setInterval(function() {reload_window()}, 1000);

</script>

The second parameter of setInterval is a wait time in milliseconds (1 sec = 1000 msec).
But unfortunately HTML panel haven't opacity property, therefore you can't set the widget opacity, even if you set image opacity using CSS and the widget haven't any background object. Very sad for me :(

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