Kodi Community Forum
Solved tooggle selected problem - 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: Solved tooggle selected problem (/showthread.php?tid=197316)



tooggle selected problem - Reynald - 2014-06-08

Hello community I need you on a silly thing. I am trying to lose hope lol.

I have been trying all day to these three buttons being selectable as a result, but never at the same time.
1 (2 available, 3 off ) 2 (3 available 1 off) 3 (1 available 2 off. Etc etc.) I would like to do this , and i have not succeed. helppppppp pleaseeeee!

I wanted to make a single button is a multiple selection, but I did not succeed also

Thank you very much


Code:
<!--Info 1 Strip -->
                    <control type="radiobutton" id="450">                    
                        <label>Strip info 1</label>
                        <onclick>Skin.ToggleSetting(stripinfo1.enable)</onclick>
                        <selected>!Skin.HasSetting(stripinfo1.enable)</selected>                        
                        <enable>!Skin.HasSetting(stripinfo2.enable)</enable>                        
                        <enable>!Skin.HasSetting(stripinfo3.enable)</enable>
                        <visible>Control.IsVisible(58)</visible>
                        <include>menu_Button</include>
                        <include>menu_RadioButton</include>    
                    </control>    
                    
                    <!--Info 2 Strip -->
                    <control type="radiobutton" id="451">                    
                        <label>Strip info 2</label>
                        <selected>!Skin.HasSetting(stripinfo1.enable)</selected>
                        <onclick>Skin.ToggleSetting(stripinfo2.enable)</onclick>
                        <enable>!Skin.HasSetting(stripinfo2.enable)</enable>
                        <enable>!Skin.HasSetting(stripinfo3.enable)</enable>                    
                        <visible>Control.IsVisible(58)</visible>
                        <include>menu_Button</include>
                        <include>menu_RadioButton</include>    
                    </control>
                    
                    <!--Info 3 Strip -->
                    <control type="radiobutton" id="452">                    
                        <label>Strip info 3</label>
                        <selected>!Skin.HasSetting(stripinfo1.enable)</selected>
                        <enable>!Skin.HasSetting(stripinfo2.enable)</enable>
                        <onclick>Skin.ToggleSetting(stripinfo3.enable)</onclick>
                        <enable>!Skin.HasSetting(stripinfo3.enable)</enable>                        
                        <visible>Control.IsVisible(58)</visible>
                        <include>menu_Button</include>
                        <include>menu_RadioButton</include>    
                    </control>



RE: tooggle selected problem - MassIV - 2014-06-08

Is this what you want to do?

Code:
<control type="grouplist">
    <visible>Control.IsVisible(58)</visible>

    <control type="radiobutton" id="450">                    
        <onclick>Skin.ToggleSetting(stripinfo1.enable)</onclick>
        <onclick condition="Skin.HasSetting(stripinfo2.enable)">Skin.ToggleSetting(stripinfo2.enable)</onclick>
        <onclick condition="Skin.HasSetting(stripinfo3.enable)">Skin.ToggleSetting(stripinfo3.enable)</onclick>
        <selected>!Skin.HasSetting(stripinfo1.enable)</selected>                        
    </control>    

    <control type="radiobutton" id="451">                    
        <onclick>Skin.ToggleSetting(stripinfo2.enable)</onclick>
        <onclick condition="!Skin.HasSetting(stripinfo1.enable)">Skin.ToggleSetting(stripinfo1.enable)</onclick>
        <onclick condition="Skin.HasSetting(stripinfo3.enable)">Skin.ToggleSetting(stripinfo3.enable)</onclick>
        <selected>Skin.HasSetting(stripinfo2.enable)</selected>                        
    </control>

    <control type="radiobutton" id="452">                    
        <onclick>Skin.ToggleSetting(stripinfo3.enable)</onclick>
        <onclick condition="!Skin.HasSetting(stripinfo1.enable)">Skin.ToggleSetting(stripinfo1.enable)</onclick>
        <onclick condition="Skin.HasSetting(stripinfo2.enable)">Skin.ToggleSetting(stripinfo2.enable)</onclick>
        <selected>Skin.HasSetting(stripinfo3.enable)</selected>                        
    </control>

</control>



RE: tooggle selected problem - Reynald - 2014-06-08

Oh Yes Smile

I spent time on it and without understanding the operation.
Thank you very much, now I will remember Smile

cheer


RE: tooggle selected problem - MassIV - 2014-06-08

<enable> is for when you want the button visible / readable but not focus-able, until another condition is met.


RE: tooggle selected problem - Reynald - 2014-06-08

actually this is what I just realized. I could still succeed out with 2 toggles, but I was starting to lose hope with 3

cheer