XBMC Community Forum
condition == in visible ? - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Skin Development (/forumdisplay.php?fid=12)
+--- Thread: condition == in visible ? (/showthread.php?tid=125963)

Pages: 1 2


condition == in visible ? - slinuxgeek - 2012-03-19 11:36

There are two buttons (or other controls which has some label/text on it which we can read).

and I want that if button1 has label "Music" then only button2 should be visible.

in button2:
<visible> what to write here </visible>

can we write something like this in button2:

<visible> control(idButton1).label =="Music" </visible>

Thanks for Help.


RE: condition == in visible ? - jmarshall - 2012-03-19 11:43

checkout stringcompare


RE: condition == in visible ? - slinuxgeek - 2012-03-19 11:49

Thank You the function worked !!

But we can not read a control's label like this -> control(idButton1).label
how can we do that?


RE: condition == in visible ? - Hitcher - 2012-03-19 11:50

Control.GetLabel(CONTROL_ID)

So you'll want to use -

PHP Code:
<visible>StringCompare(Control.GetLabel(CONTROL_ID),$LOCALIZE[3])</visible


Note the use of localize from the language string so it's universal.


RE: condition == in visible ? - slinuxgeek - 2012-03-19 12:26

Thank You Hitcher !!


RE: condition == in visible ? - jmarshall - 2012-03-20 00:57

If any of this is not clear in the wiki, then please let us know how it can be improved!


RE: condition == in visible ? - slinuxgeek - 2012-03-20 06:58

@ jmarshall :
How will I tell, you about wiki ?
means should I message you privately or by posting new thread in forum?
Thank You


RE: condition == in visible ? - jmarshall - 2012-03-20 08:12

Best is posting a thread, with the bit you don't understand, and (if you know the answer) what you think it should say to make it better.

After you've done a few of them, you can start correcting it yourself in the wiki.


RE: condition == in visible ? - slinuxgeek - 2012-04-17 13:31

@jmarshall
<control type="progress"> is not explained on wiki please explain in detail.


RE: condition == in visible ? - `Black - 2012-04-17 13:43

http://wiki.xbmc.org/index.php?title=Progress_Control