Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: two radio buttons on a single line

The following seemed to display OK for me.  Tested in JDE 4.2.1.

 

 

Dialog d = new Dialog("Message", null, null, 0, Bitmap.getPredefinedBitmap(Bitmap.QUESTION), Dialog.GLOBAL_STATUS); HorizontalFieldManager hfm = new HorizontalFieldManager(); hfm.add(new ButtonField("B1")); hfm.add(new ButtonField("B2")); hfm.add(new ButtonField("B3")); hfm.add(new ButtonField("B4")); d.add(hfm); d.doModal();

 

Give it a try.

Developer
Posts: 48
Registered: ‎08-01-2008
My Device: Not Specified

Re: two radio buttons on a single line

[ Edited ]

Wow, dude, thanks a lot!!!!!!

 

Really did the work!!!!

 

Now i'm running with another issue, my last 2 button aren't being displayed, jajajajaja, the dialog is to short to show the 5 buttons, xDDDD

 

Thanks for the help

Message Edited by cjlopez on 03-19-2009 09:39 PM
Message Edited by cjlopez on 03-19-2009 09:48 PM
Highlighted
New Developer
Posts: 6
Registered: ‎03-20-2009
My Device: Not Specified

Re: two radio buttons on a single line

strange i tried using the RadioButtonField.NO_USE_ALL_WIDTH, and I get an error 

"NO_USE_ALL_WIDTH cannot be resolved or is not a field"

 

I search in my help in eclipse, and I don't see NO_USE_ALL_WIDTH

If I search online, then I see it in the reference for RadioButtonField for OS Ver 6.0

 

My porject is using Blackberry JRE 6.0.0

 

What gives?

 

Any ideas?

Trusted Contributor
Posts: 138
Registered: ‎04-19-2012
My Device: No
My Carrier: Nokia

Re: two radio buttons on a single line

i am trying to do this but not success found to add horizontally ....only first radiobutton is visible 

plz help me 

thanks in advance.

Himanshu

Trusted Contributor
Posts: 138
Registered: ‎04-19-2012
My Device: No
My Carrier: Nokia

Re: two radio buttons on a single line

can any body help me.

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: two radio buttons on a single line

try to give layout it will work...

RadioButtonGroup group = new RadioButtonGroup();

final RadioButtonField radio1 = new RadioButtonField("one", group, true);
final RadioButtonField radio2 = new RadioButtonField("two", group, false);
HorizontalFieldManager hfm = new HorizontalFieldManager(){
protected void sublayout(int maxWidth, int maxHeight) {
setPositionChild(radio1, 0, 0);
layoutChild(radio1, 100, 50);
setPositionChild(radio2, 150, 0);
layoutChild(radio2, 100, 50);
setExtent(maxWidth, maxHeight);
}
};
hfm.add(radio1);
hfm.add(radio2);
add(hfm);
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Trusted Contributor
Posts: 138
Registered: ‎04-19-2012
My Device: No
My Carrier: Nokia

Re: two radio buttons on a single line

Thanks ya its working

but its hiding all my another fields which are just below the radiogroup means]

 

DateField , ChoiceField ,ButtonField are not showing after usinig this code.

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: two radio buttons on a single line

Hi,
Problem is in setExtent(maxWidth, maxHeight);

give some fixed height.

setExtent(maxWidth, 100);
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------