BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-30-2008, 12:36 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ListField with vetical scrollbars

Please Login to Remove!

I am missing something pretty basic here. I create a list view set a callback and add items. It seems that the manager for the screen just keeps adding rows to the list field making the screen bigger and bigger. I just want to show 4 rows and have a vertical scrollbar to view the rest is there anyway of doing this?
Offline  
Old 09-02-2008, 05:50 AM   #2 (permalink)
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by JoelParker View Post
I am missing something pretty basic here. I create a list view set a callback and add items. It seems that the manager for the screen just keeps adding rows to the list field making the screen bigger and bigger. I just want to show 4 rows and have a vertical scrollbar to view the rest is there anyway of doing this?
Hi,

You have to extend the VerticalFieldManager and create your own manager with fixed height of whatever height you want. Set the Vertical_scrollbar property as true in the constructor and you will be fine..

hope it helps...
__________________
Smart People ask for Help!!!
Offline  
Old 09-16-2008, 06:49 PM   #3 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8310
PIN: N/A
Carrier: att
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default fixed height of ListField

To set the fixed height, should I overwrite getPreferredHeight method of a Manager?

Thanx.

Young
Offline  
Old 10-10-2008, 12:20 AM   #4 (permalink)
New Member
 
Join Date: Jul 2008
Location: Bangalore
Model: 8100
PIN: N/A
Carrier: airtel
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, Its not like that. In Layout method of verticalfieldManage, you have to set the height and width.
like
objListVFieldManager = new VerticalFieldManager(VerticalFieldManager.VERTICAL _SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR){
//overrides the default layout functionality to set the width of the table cell
protected void sublayout(int width, int height){
width = Graphics.getScreenWidth();
height = 200//set here appropriate height
super.sublayout(width, height);
super.setExtent(width,height);
}// end of method protected void layout
};
And then add listfield to that VFM...
It helps you...
Offline  
Old 12-22-2008, 01:17 PM   #5 (permalink)
New Member
 
Join Date: Dec 2008
Model: 8310
PIN: N/A
Carrier: Unknow
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you help me ravindrakamble i have a TableRowManager and this extends of Manager
I did this assignation :
super(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.HORIZONTAL_SCROLL);
but i cant get any good result.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.