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: 157
Registered: ‎03-03-2009
My Device: Not Specified
Accepted Solution

set size of a VerticalFieldManager?

I need a VerticalFieldManager that occupies the left half of the screen. I thought that I could simply create an instance of VerticalFieldManager and then call its setExtent(int width, int height) to set its size. Unfortunately, setExtent is a protected function and can only be called from derived class. So that brings up two questions:

 

1. Do I need to create a customized layout manager for such a simple matter? All I need is a VerticalFieldManager only that it manages left half of the screen instead of the whole screen. 

 

2. Why is setExtent a protected method? Wouldn't it be more convenient to make it a public method? There must be some reason behind...

 

Thanks

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: set size of a VerticalFieldManager?

either:

1) override the VFM, override sublayout() and call setExtent()

2) override sublayout() in the manager holding the VFM and call layoutChild()

Developer
Posts: 105
Registered: ‎03-09-2009
My Device: Not Specified

Re: set size of a VerticalFieldManager?

either:

1) override the VFM, override sublayout() and call setExtent()

2) override sublayout() in the manager holding the VFM and call layoutChild()

 

How do you do these things?  I know how to make a whole new custom manager, but is there some simple way to just overide the protected method?  I would like to create verticalfieldmanagers of a field width...

 

The built in class verticalfieldmanager is fine, except i want a fixed width...

 

Thanks!

Developer
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: set size of a VerticalFieldManager?

Hi,

 

Check this link it will help you out in resolving your issue. 

 

Search this link with CustomLayoutManager

http://na.blackberry.com/eng/developers/resources/developer_labs.jsp#tab_tab_jde

 

Have a look at this link also

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

 

Please let me know if this information helped you or not.

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish