tags:

views:

30

answers:

2

Hi All,

I have a RadioGroup and two RadioButtonField added in a VerticalFieldManager. I want put an EditField for the first RadioButtonField horizontally. For ex: I have two RadioButtonField as "Enter number here:" otherwise user can choose "Number from existing Database:" in the second RadioButtonsField. In the first field "Enter number here:" i need provide an EditField horizontally next to first RadioButtonField, for him to type. I am trying to put an EditField horizoally but it doesn't show EditField horizonatally to the first RadioButtonField. May i know how to do that (or) any samples to do that?

Thanks.

A: 

Here's what I would do. Create a HorizontalFieldManager to hold your first RadioButtonField and your EditField. Then put this HorizontalFieldManager into your VerticalFieldManager so it will look something like this

VerticalFieldManager vert = new VerticalFieldManager();
HorizontalFieldManager line = new HorizontalFieldManager();
RadioButtonField btn1 = new RadioButtonField();
line.add(btn1);
BasicEditField editField = new BasicEditField();
line.add(editField);
vert.add(line);
RadioButtonField btn2 = new RadioButtonField();
vert.add(btn2);
Jonathan
Hi Jonathan, Thanks. But it is NOT coming to me as expected, it is still showing EditField after the RadioGroup is placed. May i know how do you add EditField position in this case? Thanks.
You don't use RadioButtonGroup() to add your RadioButtonField ? I was just wondering how does it work?
A: 

I resolved it by overriding the Layout concept mentioned as per the following link: http://supportforums.blackberry.com/t5/Java-Development/radiobuttonGroup-related-problem-in-storm/m-p/396407

Thanks to all.