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
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve
Accepted Solution

To stop scrooling in vertical manager

Hi all

 

 i am adding tow vertical manager in a single horizontal manager ,and bothe vertical manager havinag more field like menu item, and both manager having scrolling feature and scrolling well.

   But my problem is that i want to scroll only on manager at a time ,Means while i am focussing on one vertical manager that time another vertical manager shuld not scroll.

 

can any one help me.

 

Thanks

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: To stop scrolling in vertical manager

Can you please show is a picture that demonstrates the problem you are trying to resolve.  Describe how you have displayed the VFMs, what happens when you currently scroll and what you would like to happen.

 

And can you please spell check, and then re-read your text (and subject) to make sure that they make sense.  It is no fun having to try to decipher the English in a post to figure out the problem - this will lead to confusion.  There is a spell check button on the input screen to help you. 

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: To stop scrolling in vertical manager

Hi peter

 

 sorry for my mistake

 

    Actually I am using three Manager one HorizontalFieldManager and two VerticalFieldManager with scrolling feature,

 In HorizontalFieldManager I am adding both VerticalFieldManager one left and another right (here vertical field manager acting as two columns) .

In both VerticalFieldManager I am adding some field which is scrolling.

  What I need the both VerticalFieldManager should scroll separately,Means while I am focusing to scroll of left side VerticalFieldManager element that time right side VerticalFieldManager item should not be scroll.

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: To stop scrolling in vertical manager

I will have a look at this later, but I think you can achieve what you want if your HFM specifies the following style:

 

NO_VERTICAL_SCROLLING | NO_VERTICALSCROLL_BAR | USE_ALL_HEIGHT

 

and your VFMs specify

 

VERTICAL_SCROLLING | VERTICALSCROLL_BAR

 

and do not specify USE_ALL_HEIGHT.  

 

The idea is that the HFM takes up the whole screen (or what is left after the Title/Status/Banner area on a MainScreen) and gives a window that the VFM's scroll independently in.

 

Hope this works. 

 

If not, can you please provide a image showing the layout, tell use what style bits you are using for the Managers, describe what you currently see and how this is different to what you want to happen. 

 

 

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: To stop scrolling in vertical manager

 

in this image i am displaying what i need

 

Student description  using as HorizontalFieldmanager

 

Student 1,student 2...Left side VerticalFieldmanager

 

details of Student 1 in right side VerticalFieldmanager

 

So if i am scrolling right side VerticalFieldmanager  the left side VerticalFieldmanager  should not scroll.

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: To stop scrolling in vertical manager

And have you tested what I gave you?  Thanks for this, but have you actually tested what I gave you?  Is it working?  If it is not working what is happening? 

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: To stop scrolling in vertical manager

Hi peter

 

Actually I forgot to write about this thing

 

it is not working

I am not using USE_ALL_HEIGHT even HORIZONTAL_SCROLL  or any thing in HorizontalFieldManager

only in Both VFM I am using VERTICAL_SCROLL

 

simply Like

 

 

mainHorizontal=new HorizontalFieldManager();

 

mainVertical=new VerticalFieldManager(VERTICAL_SCROLL) {
            public int getPreferredHeight()
             {
                     return(ScreenResolution.height);  
             }
             public int getPreferredWidth()
             {  
                    return(ScreenResolution.width);   
             }
            protected void sublayout(int maxWidth,int maxHeight)
            {
                super.sublayout(getPreferredWidth(),getPreferredHeight());
                setExtent(getPreferredWidth(),getPreferredHeight());
            }
        };

 

 menuVertical= new VerticalFieldManager(Manager.VERTICAL_SCROLL)    
      {
             public int getPreferredHeight()  
             {
                 return((int) ((360*screenHeight)/totalHeight)  );
             }
             public int getPreferredWidth()
             {  
                 return((int) ((178*screenWidth)/totalWidth));
             }
            protected void sublayout(int maxWidth,int maxHeight)
            {
                super.sublayout(getPreferredWidth(),getPreferredHeight());
                setExtent(getPreferredWidth(),getPreferredHeight());
            }

};

 

 mainHorizontal.add(menuVertical);

 

 mainHorizontal.add(mainVertical);
 

screen.add(mainHorizontal);

 

so i think now you can understand.

 

 Note:-Actually while I am scrolling mainVertical, menuVertical also scrolling. What to do

 

Thanks.

 

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: To stop scrolling in vertical manager

"I am not using USE_ALL_HEIGHT even HORIZONTAL_SCROLL  or any thing in HorizontalFieldManager"

 

Forgive me for being frustrated, but what did I suggest here:

http://supportforums.blackberry.com/t5/Java-Development/To-stop-scrooling-in-vertical-manager/m-p/19...

 

Why have you ignored my suggestions?

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: To stop scrolling in vertical manager

Hi peter

 

 once again I come back on this topic

  actually I used your all suggestion but I dint get the solution ,But I fixed my issue using GridFieldManager.

 

Problem In HorizontalFieldManager

While I am adding two VFM in one HFM and trying to scroll both VFM separately,then while first VFM element is ending  automatically the focus is jumping to the first element of second VFM and second VFM also starting to scroll.

         So I fixed this issue using GridFieldManager.

 

Problem in GridFieldManager

 

While I am adding image for each column in GridFieldManager its making some gap between two column so can we solve this issue in GridFieldManager .

 

  Or

  can we solve the problem of HFM.

 

Thanks.

Trusted Contributor
ankitagrawal
Posts: 141
Registered: ‎02-15-2012
My Device: 9800

Re: To stop scrolling in vertical manager

Hi Avinash,

                    We can solve this problem by using Horizontal and Field managers b y using the following manner:

 

1.) Take 2 VFM(VERTICAL_SCROLL)

 

2.) Add both VFM to 1 HFM(NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL)

 

and add this HFM to screen.

 

Surely, this will scroll your problem and it won't scroll whole screen.

 


 

Please press like, if you are satisfied with post.