Charmed Quark Systems, Ltd. - Support Forums and Community
Need help with displaying slider values - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: Installation/Configuration (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=10)
+--- Thread: Need help with displaying slider values (/showthread.php?tid=1856)



Need help with displaying slider values - Acropolis - 04-06-2007

I need some help with the slider widget. I have it displaying the current value while sliding in a static text widget. The problem is that the current value is not set until I actually move the slider. Before that it is blank (or hidden). How can I have it show the value when first entering the screen without having to move the slider?

Also, can I append the level that is displayed with text - like a % sign?

Thanks,
Acropolis


Need help with displaying slider values - Dean Roddey - 04-06-2007

For the static text widget, put in an OnLoad command in the template that sets the static text widget to the current value of the field that the slider is controlling. This way you get the initial value, then the slider updates it during sliding.


Need help with displaying slider values - znelbok - 04-06-2007

Acropolis Wrote:Also, can I append the level that is displayed with text - like a % sign?

just format the string that way oyou wantit. I assume you are using %(StdRTV:CurValue), so just a a % at the end of it.

Mick


Need help with displaying slider values - Dean Roddey - 04-06-2007

If you want to put a % in, you should escape it, since it's a special character, so something like:

Code:
%(StdRTV:CurValue)\%

It's special because it starts a runtime value token.


Need help with displaying slider values - Acropolis - 04-06-2007

Thanks Mick and Dean. Everything is working exactly like I wanted it to now. I discovered 2 things today:

1. I know very little about CQC considering what it is capable of (I probably haven't even dreamed of some of the stuff it can do yet).

2. Once you get the hang of it, CQC is pretty easy to learn (at least the basics). It's amazing how much I have learned and put together in such a short period of time. I don't officially have my server or touchscreens installed yet, but I have created some screens to do weather, web, music and lighting and am continuing to work on more every day.

Thanks again for the help.

Acropolis


Need help with displaying slider values - znelbok - 04-06-2007

Dean Roddey Wrote:If you want to put a % in, you should escape it, since it's a special character, so something like:

Code:
%(StdRTV:CurValue)\%

It's special because it starts a runtime value token.

I tested this on mine and did not have to escape it (something I did check before I posted).

Mick


Need help with displaying slider values - Dean Roddey - 04-06-2007

Oh, OK, it's seeing if the next character is a ( character, and if not it doesn't require the escape.