Posts: 57
Joined: Apr 2011
Reputation:
2
Is it possible to get the selected state of a radiobutton button within the skin xml?
I want to set the visibility of a control depending whether or not the radiobutton is pressed.
I tired Control.IsSelected(id) which would work in python, but no luck in the skin xml.
Posts: 6,684
Joined: Mar 2009
Reputation:
147
phil65
Retired Team-Kodi Member
Posts: 6,684
why not just using the same condition like in your radiobutton <selected> tag?
Posts: 57
Joined: Apr 2011
Reputation:
2
determining if the radio button is selected is done in python, windowxml class, not the skin,
so I don't have a condition in the selected tag
Posts: 5,174
Joined: Jan 2010
Reputation:
97
Kib
Team-Kodi Member
Posts: 5,174
I don't get it, you ask how to determine from the skin when a radiobutton is selected, to enable the visibility of a control in the skin.
What does this have to do with python?
If the radiobutton sets a condition <a> when the user selects it, just have your control check for condition <a>.
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
If you're using a python script, there isn't necessarily a condition which you can check in the skin.
Posts: 5,174
Joined: Jan 2010
Reputation:
97
Kib
Team-Kodi Member
Posts: 5,174
I get that, it is just that the OP never mentioned a python script in his question.
Posts: 3,384
Joined: Aug 2012
Reputation:
107
braz
Skilled Skinner
Posts: 3,384
Apologies for bringing up an old thread, this was the only discussion I could find on determining the state of a radiobutton.
I'm redesigning the addon info dialog and need to determine the state of the auto-updates radiobutton (id #13) for my new buttons. I tried Hitcher's suggestion above, String.Contains(Control.GetLabel(13),*), but it always returns true.
Upon further investigation, it appears that control 13's label is always "Auto update (*)" regardless of whether it is on or off. Is there a reliable way to determine the state of this radiobutton?
Thanks for any suggestions!
Posts: 3,384
Joined: Aug 2012
Reputation:
107
braz
Skilled Skinner
Posts: 3,384
Thanks for the suggestion Ronie, you're right though, that doesn't change the state of the radiobutton either. Will have to figure out where to stick control #13 since it looks like it's not going to work in my custom menu.