View Full Version : <radio> tag
sandman
02-27-2003, 02:21 PM
Is there an example that shows how to use the "radio" tag. Its not very clear from documentation.
antun
02-27-2003, 02:47 PM
Hey Sandman
Try this:-
<canvas debug="true">
<simplelayout axis="y" spacing="5" />
<radio name="myRadio" group="animals" label="Dog" />
<radio group="animals" label="Cat" />
<button>
<method event="onclick">
var rad = canvas.myRadio.getSelectedInGroup( 'animals' );
debug.write( rad.label );
</method>
</button>
</canvas>
You may want to check out the patched radio button code here:-
http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=73
I agree the docs aren't complete (and it's not used anywhere). It also behaves a little funny. You might want to think about extending the class to get it to work more intuitively, or you could let us know what you expect, and we'll consider fixing it.
-Antun
Hi, Antun!
I am trying to use radio object and implement the following idea. I have two (or more) radio buttons, like in example below, and one simple button. I want to be able to choose "Cat" radio button by pressing a "simple" button. Something like that:
<canvas debug="true">
<simplelayout axis="y" spacing="5" />
<radio name="myRadio" group="animals" label="Dog" selected="true"/>
<radio group="animals" label="Cat" />
<button label="Select Cat">
<method event="onclick">
canvas.myRadio.setSelected("Cat");
</method>
</button>
</canvas>
Or course, this does not work right now. :) Can you recommend me something ?
- Igor
antun
06-06-2003, 01:42 PM
Hey Igor
You might want to check out this (even more) updated checkbox:
http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=235
Right now we're in the process of revamping all of the components. There are known bugs with checkbox and combobox in particular.
Take care,
Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.