cancel
Showing results for 
Search instead for 
Did you mean: 

How to put radio buttons horizontally?

Former Member
0 Kudos

Hi All,

I am using RadioButtonGroupByKey.But its coming vertically.I want this to be displayed horizontally.Please help me soon.

thanx

anirudh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Create an attribute with type int and bind it to the colCount property and get the length of the radio button at runtime(Radiobuttonnode.size()) and set it to the attribute.You can get the radio button horizontally.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi,

You can set the colCount property accordingly to get the horizontal

Saravanan K

Former Member
0 Kudos

Hi Sravan,

I insert a child RadioButtonGroupByKey.Then its coming vertically with three options.I want those three options in horizontally.According to you i changed colCount to three.But its coming 9 radiobuttons.I only want three options horizontally.please reply me.

thanx

anirudh

Former Member
0 Kudos

Hi,

In designtime you will see 9 radiobuttons,but when you bind this to the simpletype which has 3 values means you will get only 3 radiobuttons.

Regards,

Saravanan K

Former Member
0 Kudos

Hi Saravan,

Thanx fr ur response.I want three radio buttons by using radiobuttongroupbykey.If i want to create the same dnyamically,how can i do this?

thanx

anirudh

Former Member
0 Kudos

Hi,

Refer this thread,

You can find the solution of dynamically creating the SimpleType values.

regards

karthik

Former Member
0 Kudos

Bind the RadioButtonGroupByKey.<i>selectedKey </i>property to a context attribute of type "string" (or DDIC simple type with valueset).

You can either use the static valueset from the DDIC type or modify the valueset at runtime.

To modify it, use code like

IWDAttributeInfo info = wdContext.getNodeInfo().getAttribute("<name-of-attribute>");
IModifiableSimpleValueSet valueSet = info.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
valueSet.clear();
valueSet.put("<key1>", "<value1>"); 
valueSet.put("<key2>", "<value2>"); 
valueSet.put("<key3>", "<value3>"); 

Then you will get 3 radio buttons displaying "value1", "value2", "value3". Selecting a button will set the context attribute to the corresponding key.

Set RadioButtonGroupByKey.<i>colCount </i>= 3 to get them in one row.

Armin