BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 09-11-2007, 12:10 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Jul 2007
Model: 8800
Carrier: CLDC
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Post Removing Vertical ScrollBar

Please Login to Remove!

Hi, All
I m trying to remove a Vertical Scrollbar from my BB screen using VerticalFieldManager.NO_VERTICAL_SCROLLBAR.

But the code is not working for me.....See the following code...

private class MyFieldManager extends VerticalFieldManager

public MyFieldManager()
super(VerticalFieldManager.NO_VERTICAL_SCROLLBAR | VerticalFieldManager.USE_ALL_HEIGHT);

* (non-Javadoc)
* @see net.rim.device.api.ui.Manager#paint(net.rim.device .api.ui.Graphics)
protected void paint(Graphics g)

// TODO Auto-generated method stub
// storing the Width and Height of BB screen
int XWidth = g.getScreenWidth();
int YHeight = g.getScreenHeight();

// storing the Height of bitmap image
int imageHeight = BgBitmap.getHeight();

// placing image center of the BB Vertically
int YDiff = (YHeight - imageHeight) / 2;

// Checking if BB Screen Resolution is 240*260
g.drawBitmap(0, YDiff, XWidth, YHeight - YDiff, BgBitmap1, 0, 0);


// this is for the Screen Resolution 320*240
// placing image center of the BB Horizontally
int XDiff = (XWidth - BgBitmap.getWidth()) / 2;
g.drawBitmap(XDiff, YDiff, XWidth - XDiff, YHeight - YDiff, BgBitmap, 0, 0);




Plz anybody can help me.......Thanks in advance....
Old 09-11-2007, 11:13 AM   #2 (permalink)
Knows Where the Search Button Is
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Post Thanks: 0
Thanked 0 Times in 0 Posts

The code looks fine. Where are you using this class? If you add this to a mainscreen, it has a VerticalFieldManager with a scrollbar already. You may be seeing the scrollbar from there.
Old 10-09-2008, 11:36 PM   #3 (permalink)
New Member
Join Date: Jul 2008
Location: Bangalore
Model: 8100
Carrier: airtel
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts

And also use in super as VerticalFieldManager.NO_VERTICAL_SCROLL
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Digital Potentiometer g2
Digital Potentiometer g2 picturePotentiometer S1
Potentiometer  S1 picturePotentiometer S1
Potentiometer  S1 picturePotentiometer s1
Potentiometer        s1 pictureDigital Potentiometer INDO 1
Digital Potentiometer INDO 1 picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.