开发者

Blackberry: RadioButtonFiled and EditFiled in the same line doesn't show EditField?

开发者 https://www.devze.com 2023-01-02 20:37 出处:网络
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 Rad开发者_运维百科ioButtonField as

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 Rad开发者_运维百科ioButtonField 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.


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);


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号