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
Regular Contributor
Posts: 89
Registered: ‎07-13-2010
My Device: 8700

horizontal scroll

can ny1 pls tell me how to test horizontal scroll in blackberry 8700 ...m using jde 4.2.1...

 

i did dis...

 

super(Manager.HORIZONTAL_SCROLL|Manager.HORIZONTAL_SCROLLBAR);

 

i tried everytin ...arrows keys also...nt working...i tried d same code wid jde5.0 n 9550 simulator ...on pressin alt+left arrow key m able 2 scroll horizontally...

 

i hv created columns ...if i hv more nos of columns lyk 5-10 can i view dem using horizontal_scroll??

m using objectlistfield - listcallback....

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: horizontal scroll

Make sure you have Field.FOCUSABLE fields outside your HFM's visible area - then it will start scrolling on navigation.  Use NullField(NullField.FOCUSABLE) if you don't want your own fields to receive focus.

 

Good luck!

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Regular Contributor
Posts: 89
Registered: ‎07-13-2010
My Device: 8700

Re: horizontal scroll

can u please elaborate a lil more...my horizontal scroll is still nt working Smiley Sad

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: horizontal scroll

hey i agree with arkadyz

 

in blackberry u can scroll only if u have scrollable fields present

 

make sure that the region where u want to have horizontal scroll bar must contain focussable fields

infact if u do not have scrollable fields u can add blank,focussable label fields

 

add(new LabelField("",Field.FOCUSABLE));

Highlighted
Regular Contributor
Posts: 89
Registered: ‎07-13-2010
My Device: 8700

Re: horizontal scroll

ObjectListField listfield=new ObjectListField(ObjectListField.FOCUSABLE);

 

added elements into vector and displayed o/p as columns using drawlistrow.

 

public boolean trackwheelRoll(int amount, int status, int time)   
    {
   
     //   listfield.invalidate();
        return navigationMovement(0,amount,status,time);
    }

 

protected boolean navigationMovement(int dx, int dy, int status, int time) {
if( listfield.getSelectedIndex() + dy >= listfield.getSize() ) {
return true;

}

 

 

....is dis code correct??? when i click on alt key in my 8700 simulator it shows me up n down arrow key...i wanna scroll left and right ..