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

Reply
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

How to make the radioButtonField centered?

Hi Guys,I want the radioButtonfield to be centered,When i applied style like this,it showed error.

 

 

 rg=new RadioButtonGroup();
        rbf=new RadioButtonField("Kg",rg,true,RadioButtonField.FIELD_HCENTER)
        {
            public void paint(Graphics g)
            {
                g.setColor(Color.RED);
                super.paint(g);
            }
                    
        };
    
        rg.add(rbf);
          this.add(rbf);

 

 

It showed error,how to get it to center

 

Regards

 

Rakesh Shankar.P    

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to make the radioButtonField centered?

position it with sublayout of the manager
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 1,006
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to make the radioButtonField centered?

[ Edited ]

I cant get it Sir,How to position it using sublayout of the manager?Are u Saying to position it manually(i.e)using set PositionChild Like that ah?

Highlighted
Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to make the radioButtonField centered?

yes. if the position flags don't work do the layout yourself.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter