:: Forum >>

How to increase the width for a specific radio button?

I have 3 radio buttons horizontal aligned and I need to increase the width only for the second one. (I have limited space in the line where I'm displaying the radio bttns)

Using :
#my_radio .aw-item-template {width: 80px;}
increases the space between all of them. How do I specify different space/width for each radio button?

Thanks!

<style>
#my_radio{ left: 100px; top: 120px; width: 300px; height: 18px; }
#my_radio .aw-item-template {width: 80px;}
</style>

var search_radio = new AW.UI.Radio;
search_radio.setId("my_radio");
search_radio.setItemText(["Sale", "Anonymous Buy", "Buy"]);
search_options_radio.setItemCount(3);
search_options_radio.setClass("flow", "horizontal");
document.write(search_radio);
Ifma
Friday, August 8, 2008
search_radio.getItem(1).setStyle("width", "150px");
Alex (ActiveWidgets)
Monday, August 11, 2008
Alex,

Unfortunately line above didn't work. Seems that the method is not supported by the radio bttn. I got the following message :
"Object doesn't support this property or method"

Is there any other way to do it?
Thanks!
Ifma
Monday, August 11, 2008
This code is for AW 2.5. If you are still working with AW 2.0 then use

search_radio.getItemTemplate(1).setStyle("width", "150px");
Alex (ActiveWidgets)
Monday, August 11, 2008
Thanks Alex!

I'm using 2.0 ... so the second solution worked perfect for me.
Ifma
Monday, August 11, 2008

This topic is archived.


Back to support forum

Forum search