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

Posts: 67
Registered: ‎10-14-2009
My Device: Not Specified

Re: Adding Background image to the Manger

I usually do this:

all my Screens extend a custom screen class ("DefaultScreen") with the following constructor:


public DefaultScreen(){




Then i just add managers as i want to with this.add(myManager).

So my normal screen never scrolls, I always add a


private VerticalFieldManager vfmMain = new VerticalFieldManager(Manager.VERTICAL_SCROLL);

and add all the other rest there. you can mix any manager you want with that as long as none has it's own background.



blog: http://coding.westreicher.org
twitter: http://www.twitter.com/meredrica
Posts: 26
Registered: ‎10-21-2009
My Device: Not Specified

Re: Adding Background image to the Manger


I have actually tried removing all managers but the mainVerticalManager and still the backgound image only comes up til a certain point. I cant seem to figure out what could be the problem.. Could the size of the image be of concern?


As i mentioned in my prev post, i tried a similar layout.


i dont see any issues in scrolling.


PM me, if u need code.




Posts: 207
Registered: ‎07-31-2009
My Device: Not Specified

Re: Adding Background image to the Manger

I have fixed my problem with the following code :


 FullScreen newScreen = new FullScreen(Manager.NO_VERTICAL_SCROLL){
         	  protected void paint(Graphics graphics)
         	    graphics.drawBitmap( (this.getWidth() / 2) - (_backgroundBitmap .getWidth() /2),
                           (this.getHeight() / 2) - (_backgroundBitmap .getHeight() /2),
                           _backgroundBitmap .getWidth(),
                           _backgroundBitmap .getHeight(),
                           _backgroundBitmap ,0,0);


That is now it comes fully . The whole screen has the background.. But am having some sort of screen paint issue. for Eg: when an object choice field is clicked the background surrounding it goes white.. Plus if i were to scroll a really long page the screen just goes crazy with the background here and there . I guess the screen needs to be repainted each time a scroll happens . I am not sure how efficient that would be . I dont know if we can catch the scroll event of the mainVertical manager...  




Click the Kudos! badge on left side of the message , if you are happy with a solution given by a user. When you do so, you are saying thanks to its author.
Mark a reply as a solution , if you think your question has been answered.
To mark a message as a solution: Click "Accept as solution" icon on the reply.