Kodi Community Forum
Radio Button default on - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Radio Button default on (/showthread.php?tid=97002)



Radio Button default on - pecinko - 2011-03-16

Guys,

I would like to add radio button in customsettings.xml and I would like it to be ON (selected) by default. Is it possible?

Or let me ask this in other way - I would like to add option for user to disable submenu item if choose so. So, it should be ON by default so that item can appear in submenu. Using radio button in a way that user select it in order to disable item seams awkward to me.


- Hitcher - 2011-03-16

Just add this to the button control -

PHP Code:
<selected>!Skin.HasSetting(YOUR_SETTING_HERE)</selected



- pecinko - 2011-03-16

Hitcher Wrote:Just add this to the button control -

PHP Code:
<selected>!Skin.HasSetting(YOUR_SETTING_HERE)</selected

..and flip RadioButtonNF.png & RadioButtonFO.png

Thanks.


- Hitcher - 2011-03-16

You don't need to change anything else because that will default the button to ON when first used.


- pecinko - 2011-03-16

You're right again. Xbmc restart is recommended :-)