Shoutbox

Radio buttons in SKin options - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Skinning (/forumdisplay.php?fid=41)
+----- Thread: Radio buttons in SKin options (/showthread.php?tid=85567)

Radio buttons in SKin options by Knightmare101 on 08-24-2008 at 12:46 AM

I am trying to put radio buttons in my skins optins window. I need it that the two options can never be selected at the same time. So if one is selected the other automatically de-selects. I know how to put everythign else in but am at a loss on how to create those radio buttons. I included an example as to what the radio button are. Thanks for any input.


RE: Radio buttons in SKin options by ryxdp on 08-24-2008 at 01:07 AM

You could just put in a MultiVal instead, it does more or less the same thing:

XML code:
<MultiVal Name="FormatBarAlign">
    <DispLabel>MultiVal</DispLabel>
    <DispHelp>Description/DispHelp>
    <Values>
        <Value DispLabel="Option 1">option1</Value>
        <Value DispLabel="Option 2">option2</Value>
    </Values>
    <Default>option1</Default>
</MultiVal>


EDIT: It's a ComboBox control, not a radio button, but meh.
RE: Radio buttons in SKin options by Basilis on 08-24-2008 at 07:28 AM

A common ComboBox control is like this:

code:
<Control xsi:type="ComboBoxControl" Id="OptionName">
                <Position Top="10" Width="100" Left="10"/>
                <Items>
                         <Item Id="ItemId1">Name of the first item</Item>                               
                         <Item Id="ItemId2">Name of the second item</Item>                                                 
                </Items>
                <Help>This text appears when you hover your mouse over the box. It is usually a help text.</Help>
</Control>

RE: Radio buttons in SKin options by Willz on 08-24-2008 at 10:07 AM

What he is trying to do is restrict the user from being able to select a certain range of buttons depending on the value of a radio button. So you guys are sort of missing the point of what hes trying to get at.

From what I know I don't think there is anything like that implemented in the skin system (correct me if I am wrong). So I don't think you will be able to achieve what you are after. You will probably just have to settle for a combobox instead as mentioned already.


RE: RE: Radio buttons in SKin options by ZOiD on 08-26-2008 at 03:00 AM

Hello!!!

quote:
Originally posted by Willz

From what I know I don't think there is anything like that implemented in the skin system (correct me if I am wrong)(ZOiD= :$ )So I don't think you will be able to achieve what you are after. You will probably just have to settle for a combobox instead as mentioned already.


I was trying and if I could do it...
Only I have proved it with the "Boolval", with the "Multival" do not try it.

They are two "Boolval":

code:
<BoolVal Name="RMail">
                    <DispLabel>Boton Mail</DispLabel>
                    <DispHelp>Retira/Coloca El Botón Mail</DispHelp>
                    <Default>false</Default>
                </BoolVal>

<BoolVal Name="RPsm">
                    <DispLabel>Mensaje personal</DispLabel>
                    <DispHelp>Retira/Coloca El mensaje personal de tus contactos</DispHelp>
                    <Default>true</Default>
                </BoolVal>

This is what goes placed in the .xml of your interface

code:
<Control xsi:type="RadioControl" Id="RMail">
                <Position Top="167" Width="120" Left="39"/>
                <Help>Retira/Coloca El Botón Mail</Help>
                <Attributes>
                    <IsNewGroup>false</IsNewGroup>
                </Attributes>
                <Caption>Boton Mail</Caption>
            </Control>
            <Control xsi:type="RadioControl" Id="RPsm">
                <Position Top="167" Width="120" Left="161"/>
                <Help>Retira/Coloca El mensaje personal de tus contactos</Help>
                <Caption>Mensaje personal</Caption>
            </Control>
        </Controls>

I wait could do it...

seelater!!!
RE: Radio buttons in SKin options by Willz on 08-26-2008 at 03:37 AM

yes you can make one, but the point is to be able to make another option not selectable depending on the value of a radio button. That is what I was referring to not being able to be done.

With what you have there you might as well use checkboxes.


RE: Radio buttons in SKin options by ZOiD on 08-26-2008 at 04:09 AM

Hello!!!
Since on having selected an option automatically other one stays off...
I thought that "Knightmare101" needed the option like that.

Pdt:
I do not still had very clear the previous thing that you said(A).
Seelater!!!


RE: Radio buttons in SKin options by Knightmare101 on 08-29-2008 at 01:48 AM

Thanks guys for the tips.

ZOID I already firgured outmost of what you stated. But thanks anyway.

I do have the radio button in there and everythign the way I want it but the actual clicking on one radio and having the other disable at the same time is a buit harder. If I can figure it out I'll let you all know.


RE: Radio buttons in SKin options by Knightmare101 on 08-30-2008 at 10:26 PM

OK her is an updated picture from my skin options. for thise radio buttons.

I have all the code I need. Except for the code that keeps only one badio button selected at a time as you can see in the picture.


RE: Radio buttons in SKin options by ZOiD on 08-30-2008 at 10:52 PM

Hello!!!

And if you try with 

Visible="false"
(Only for one radiobutton,  maybe...)

Seelater!!!


RE: Radio buttons in SKin options by Volv on 08-31-2008 at 12:01 AM

Knightmare, unfortunately it's not possible to change the values of any elements or controls in the skin options without actually changing the Options.xml file (or whatever your options file is named), it's just a limitation of the current skinning system.

Your best choice based on the screenshot you provided is to just combine it all into one so that you just 'choose a hero/heroine' (and have both males and females together in the combo box) instead of having to select hero/heroine first then choose from the list.

I assume the only reason you're not doing this as of yet is because you want to be able to determine whether the user has selected a hero/heroine so that you could for example change a background colour between blue (male) and purple (female) or something along those lines. The only solution for that is to just include all of the heroes' names in your conditional tags:

code:
<*PlusSkin Conditions(Hero = "Batman" OR Hero = "Silver Surfer")*>
    <element background=rgb(0,0,255)>
</*PlusSkin*>

<*PlusSkin Conditions(Hero = "Spidergirl" OR Hero = "Wonder Woman")*>
    <element background=rgb(160,32,240)>
</*PlusSkin*>