Kodi Community Forum

Full Version: Retrieving Label 2 from radiobutton
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I used the new label2 On/Off text for a dummy button and tried to get this label2 Inside a static list content but seems it doesn't work :

Button is set like this in DialoAddonInfo.xml (built-in control) :

PHP Code:
<!-- Auto Update -->
<
control type="radiobutton" id="13">
    <
visible>false</visible>
    <
radiowidth />
     <
radioheight />
</
control

And item in list :

PHP Code:
<!-- Auto Update -->
<
item>
    <
label>$LOCALIZE[21340] : $INFO[Control.GetLabel(13).index(1)]</label>
    <
icon>material/update.png</icon>
    <
onclick>SendClick(10146,13)</onclick>
    <
visible>Control.IsEnabled(13)</visible>
</
item

But seems that the .index(1) is empty.
Thx
(2015-02-24, 00:08)ronie Wrote: [ -> ]2015-02-18 Control.GetLabel() - index() support

this change allows skinner to retrieve label2 of a control.
currently only edit controls are supported though.

ex.: Control.GetLabel(999).index(1)
(index(0) = label / index(1) = label2)

git commit: https://github.com/xbmc/xbmc/commit/deeb...41e2c8272d
pull request: 6327 (PR)
(2015-11-09, 13:40)Hitcher Wrote: [ -> ]
(2015-02-24, 00:08)ronie Wrote: [ -> ]2015-02-18 Control.GetLabel() - index() support

this change allows skinner to retrieve label2 of a control.
currently only edit controls are supported though.

ex.: Control.GetLabel(999).index(1)
(index(0) = label / index(1) = label2)

git commit: https://github.com/xbmc/xbmc/commit/deeb...41e2c8272d
pull request: 6327 (PR)

Damn, thanx Hitcher. Took it straight from wiki where nothing's specified, sorry for that. Would be great to notify it there too.

EDIT : Any other way to get the state of a radiobutton ?
Hey,

maybe with

Code:
SubString(Control.GetLabel(ID),*)

if it works with the new index

regards
(2015-11-09, 13:51)Jayz2K Wrote: [ -> ]
(2015-11-09, 13:40)Hitcher Wrote: [ -> ]
(2015-02-24, 00:08)ronie Wrote: [ -> ]2015-02-18 Control.GetLabel() - index() support

this change allows skinner to retrieve label2 of a control.
currently only edit controls are supported though.

ex.: Control.GetLabel(999).index(1)
(index(0) = label / index(1) = label2)

git commit: https://github.com/xbmc/xbmc/commit/deeb...41e2c8272d
pull request: 6327 (PR)

Damn, thanx Hitcher. Took it straight from wiki where nothing's specified, sorry for that. Would be great to notify it there too.

EDIT : Any other way to get the state of a radiobutton ?
Updated the wiki to reflect this.
(2015-11-09, 15:14)Marc0810 Wrote: [ -> ]Hey,

maybe with

Code:
SubString(Control.GetLabel(ID),*)

if it works with the new index

regards

Huh ! Was asking myself what the (*) in Control.GetLabe(13) was. It's so ridiculously evident that I didn't catch it.
Seems it's not my day guys, I will retain to post some more stupid things today Nerd
Thanks for this one Wink

(2015-11-09, 15:28)Hitcher Wrote: [ -> ]Updated the wiki to reflect this.

Thanks Hitcher.
(2015-11-09, 16:39)Jayz2K Wrote: [ -> ]Huh ! Was asking myself what the (*) in Control.GetLabe(13) was. It's so ridiculously evident that I didn't catch it.
Seems it's not my day guys, I will retain to post some more stupid things today Nerd
Thanks for this one Wink

Simple questions are good for my bad englishSmile
Hopefully it works with the index feature.

regards