Solved tooggle selected problem
#1
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>
Reply
#2
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>
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#3
Oh Yes Smile

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

cheer
Reply
#4
<enable> is for when you want the button visible / readable but not focus-able, until another condition is met.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#5
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
Reply

Logout Mark Read Team Forum Stats Members Help
tooggle selected problem0