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
demotics2002
Posts: 64
Registered: ‎07-15-2010
My Device: Storm 2 - 9550
Accepted Solution

How to fix a field located at the top of ListField

Hi,

 

I have a problem fixing the field at the top of ListField when scrolling. I know it is the responsibility of the FieldManagers but I couldn't just make it work.

 

2735i75EBFD5D9FEA57E5

 

Below is what happens when I scroll down... The orange header is gone.

 

2736i5DEADB95686BD759

 

many thanks...

Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: How to fix a field located at the top of ListField

If this is the only field in a MainScreen, perhaps you can use setBanner() to get the effect you want.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Developer
demotics2002
Posts: 64
Registered: ‎07-15-2010
My Device: Storm 2 - 9550

Re: How to fix a field located at the top of ListField

Thanks Ted,

 

I should have pasted my code:

 

 

public class FListScreen extends MainScreen implements FieldChangeListener {
	
	ListField list;
	
	public FListScreen() {
		MagLabel01 label = new MagLabel01();
		add(label); // The orage banner on top
		VerticalFieldManager vfm = new VerticalFieldManager();
		vfm.setMargin(2, 2, 2, 2);
		list = new TaskListField();
		list.setChangeListener(this);
		vfm.add(list);
		add(vfm);
	}
}

 

I want to use the orange field on top for search functionality. I just haven't started yet. I want it to be just something like the "MemoPad" program where you can search the items in the ListField.

 

Developer
demotics2002
Posts: 64
Registered: ‎07-15-2010
My Device: Storm 2 - 9550

Re: How to fix a field located at the top of ListField

Ted, your solution works. Many thanks!