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,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: ObjectChoiceField problem

You could, try extending the width of the layout.. Or how do you want it to be?
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
Posts: 89
Registered: ‎07-03-2009
My Device: Not Specified

Re: ObjectChoiceField problem

I want the string is inside the box, if I extend the width, it will be out of the box:

 

http://img148.imageshack.us/img148/5806/extendwidth.jpg

 

Beside, I have many options, each option has a different length. So, I think the best way is just show a part of of sentence and ... .

 

Sorry for my bad English.    

 

Regards.

Developer
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: ObjectChoiceField problem

Mark says that this cannot be done..

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=24352&query.id=51...

 

Will get back If I get any, Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Highlighted
Developer
Posts: 89
Registered: ‎07-03-2009
My Device: Not Specified

Re: ObjectChoiceField problem

Hi mantaker,

 

I can solve the problem now. To keep the string be inside the box, I add ObjectChoiceField to a HorizontalFieldManager with setExtent() method something like this:

 

HorizontalFieldManager choiceLayout = new HorizontalFieldManager(Manager.NO_HORIZONTAL_SCROLL|Manager.NO_VERTICAL_SCROLL){
                   protected void sublayout(int width, int height) {
                        super.sublayout(width,height);
                        setExtent(270,27);//270,27 are the width and height of the box

                   }   
             
               };

 

 Therefore I can catch the first line of ObjectChoiceField now. Smiley Very Happy

 

Regards,

 

Developer
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: ObjectChoiceField problem

Glad that you got it solved..

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group