XWidgetSoft Forum https://xwidget.com/bbs/ |
|
Attach text with progressbar https://xwidget.com/bbs/viewtopic.php?f=8&t=4473 |
Page 1 of 1 |
Author: | Jimking [ May 3rd, 2014, 6:30 am ] |
Post subject: | Attach text with progressbar |
Guys, how can attach a txt with a progress bar, so the text will follow the movement of the bar.?? I tried to connect the two of them "bar+txt" but doesn't work.. (I don't speak about the "tumb" function because supports only images) |
Author: | qiancang [ May 3rd, 2014, 7:19 am ] |
Post subject: | Re: Attach text with progressbar |
search seek volume in my da gallery. (maybe i wrote seek volumn in mistake at that time) |
Author: | Jimking [ May 3rd, 2014, 7:26 am ] |
Post subject: | Re: Attach text with progressbar |
qiancang wrote: search seek volume in my da gallery. (maybe i wrote seek volumn in mistake at that time) Found it! http://qiancang.deviantart.com/art/SeekVolumn-348650117 pm: I will study how it works and If I need extra help I will post it here.. Thank you! ![]() |
Author: | Jimking [ May 3rd, 2014, 7:30 am ] |
Post subject: | Re: Attach text with progressbar |
By the way: Which is the script to switch ON/OFF the "Shake Animation" function of a "layer"...??? |
Author: | hamid [ May 3rd, 2014, 11:07 am ] |
Post subject: | Re: Attach text with progressbar |
how about this: Code: text1.top = progressbar1.Height-progressbar1.thumb.top+10; note: change the number to adjust to your design |
Author: | Jimking [ May 3rd, 2014, 11:09 am ] |
Post subject: | Re: Attach text with progressbar |
Works great!! ![]() Thanks a lot mate! pm: By the way, how about the script to switch ON/OFF the "Shake Animation" function of a "layer"...? |
Author: | hamid [ May 3rd, 2014, 12:14 pm ] |
Post subject: | Re: Attach text with progressbar |
wait a minute; use this instead: Code: text1.top=progressbar1.Top+progressbar1.Height-progressbar1.thumb.top-22 added "progressbar1.Top", so it doesn't need changing the code again if you move the objects in the designer note: the number is the dimension on thumb image (it depends on the dimensions of thumb image) Quote: By the way, how about the script to switch ON/OFF the "Shake Animation" function of a "layer"...? try this:Code: layer1.Shake.Enabled=!layer1.Shake.Enabled
|
Author: | Jimking [ May 3rd, 2014, 12:31 pm ] |
Post subject: | Re: Attach text with progressbar |
hamid wrote: wait a minute; use this instead: Code: text1.top=progressbar1.Top+progressbar1.Height-progressbar1.thumb.top-22 added "progressbar1.Top", so it doesn't need changing the code again if you move the objects in the designer note: the number is the dimension on thumb image (it depends on the dimensions of thumb image) Are actually three separate progressbars with hours,mins, and secs. I will try..Thanks!!! |
Author: | Jimking [ May 3rd, 2014, 1:45 pm ] | ||
Post subject: | Re: Attach text with progressbar | ||
Could you pls check it? Works ok but there is a problem with the "update/loading" behaviour of the text.. Run it and you will understand.. Is there a way to fix it though script..?
|
Author: | Jimking [ May 3rd, 2014, 2:39 pm ] |
Post subject: | Re: Attach text with progressbar |
Edit: I discover that maybe the issue is beacuse the "switch animation".. It could be cool if we can have them on, but the low cpu consumption is not so good either.. |
Author: | hamid [ May 3rd, 2014, 2:41 pm ] |
Post subject: | Re: Attach text with progressbar |
do you mean problem that on 00 happens or something else? |
Author: | Jimking [ May 3rd, 2014, 2:47 pm ] |
Post subject: | Re: Attach text with progressbar |
I mean that when the "switch animation" is on for the progressbars before the time updates, the texts are off position. Not only for the secs but for all three. I tried to turn off the animation and then the texts position is ok. But with the anim on, not work properly... |
Author: | hamid [ May 3rd, 2014, 3:29 pm ] |
Post subject: | Re: Attach text with progressbar |
we could fix the on load problem by using WidgetOnLoad() but there is also another problem happens: when timer get 00 it doesn't update the position (when the animation is on) this could be also fixed by adding an exception for it but i'm looking for a better way |
Author: | Jimking [ May 3rd, 2014, 3:43 pm ] |
Post subject: | Re: Attach text with progressbar |
Thanks hamid!!! If you can find a solution it will be great. If not it's ok too.. If we decide to keep the switch animation, we need to find better values/kind of the animation to reduce the cpu.. Edit: Unfortunately I tried all the possible combinations but the cpu, when the secs go >30, are ~8-12%, bad consumption.. So leave it man. I will make it without the animations.. Let's hope that the v2 of XW will use less resources and let us do more things.. Switch and shake animations with middle size images are almost forbidden.. ![]() |
Author: | Jimking [ May 4th, 2014, 7:53 am ] |
Post subject: | Re: Attach text with progressbar |
Posted: viewtopic.php?f=11&t=4493 |
Author: | hamid [ May 8th, 2014, 4:44 pm ] |
Post subject: | Re: Attach text with progressbar |
you can use this code for animation version: Code: function progressbarhourOnChange(Sender)
{ text1.top = (progressbarhour.Height-progressbarhour.IndentStart)*datetimecore1.get("%HourPercent")/100 +385 ; } function progressbarsecOnChange(Sender) { text2.top = (progressbarsec.Height-progressbarsec.IndentStart)*datetimecore1.get("%SecondPercent")/100 +174 ; } function progressbarminOnChange(Sender) { text3.top = (progressbarmin.Height-progressbarmin.IndentStart)*datetimecore1.get("%MinutePercent")/100 +125 ; } |
Author: | Jimking [ May 8th, 2014, 5:13 pm ] |
Post subject: | Re: Attach text with progressbar |
Thanks hamid. As I wrote, let's hope that the v2 of XW will use less resources and let us do more things without need everytime to find tricks with script.. |
Author: | hamid [ May 8th, 2014, 5:28 pm ] |
Post subject: | Re: Attach text with progressbar |
how much does it use? i don't see any effect on my system edit: for me, between 50-00sec it will get 3-5% |
Author: | Jimking [ May 8th, 2014, 5:44 pm ] |
Post subject: | Re: Attach text with progressbar |
Trying a lot of combinations, between 35-00 sec, I get ~8-10%. For some widgets, I noticed that the cpu consumption depends on the capability/power of the system. Not all widgets have the same behaviour for all.. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |