3

I am using this code to set the scrollBar to the VerticalFieldManager in Blackberry

   VerticalFieldManager temp2=new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL);
   LabelField result=new LabelField("Result \n Result\n Result\n Result \n Result\n");   
   temp2.add(result);

The labelField is added and the contents are displayed by the VerticalFieldManager is not getting scrolled.Is my code is correct?.If anyone have any idea to handle this please help me.

Kon
  • 27,113
  • 11
  • 60
  • 86
Rajapandian
  • 9,257
  • 24
  • 74
  • 86

2 Answers2

4
 1. Set VerticalFieldManager style to VERTICAL_SCROLL|VERTICAL_SCROLLBAR    
 2. Add a new NullField(Field.FOCUSABLE) after LabelField
Maksym Gontar
  • 22,765
  • 10
  • 78
  • 114
1

My solution:

VerticalFieldManager temp2=new VerticalFieldManager(Manager.VERTICAL_SCROLL);
LabelField result=new LabelField("Result \n Result\n Result\n Result \n Result\n",FOCUSABLE);   
temp2.add(result);
VerticalFieldManager temp=new VerticalFieldManager();
temp.add(temp2);
add(temp);
eeerahul
  • 1,629
  • 4
  • 27
  • 38
iKushal
  • 2,689
  • 24
  • 20