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
PIN: N/A
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
if (XWidth <= TARGET_DEVICE_WIDTH)
{
g.drawBitmap(0, YDiff, XWidth, YHeight - YDiff, BgBitmap1, 0, 0);

}

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

}

super.paint(g);
}

}



Plz anybody can help me.......Thanks in advance....
Offline  
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
Default

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.
Offline  
Old 10-09-2008, 11:36 PM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Location: Bangalore
Model: 8100
PIN: N/A
Carrier: airtel
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

And also use in super as VerticalFieldManager.NO_VERTICAL_SCROLL
Offline  
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

10 New Electronic ballast (Keystone) T8 120-277
$55.0
10 New Electronic ballast (Keystone) T8 120-277 pictureBODINE B94C FLOURESCENT EMERGENCY BALLAST 4-PIN LAMPS, 2 LAMP, 42W CFL 120/277V
$94.5
BODINE B94C FLOURESCENT EMERGENCY BALLAST 4-PIN LAMPS, 2 LAMP, 42W CFL 120/277V pictureGE 96714 ELECTRONIC BALLAST GE-232-MV-PS-N
$7.99
GE 96714 ELECTRONIC BALLAST GE-232-MV-PS-N picture10 PC GE-332-MAX-N/ULTRA 4 LAMP T8 BALLAST 120-277 V 50/60Hz
$99.0
10 PC  GE-332-MAX-N/ULTRA 4 LAMP T8 BALLAST 120-277 V 50/60Hz pictureFulham WH2-120-L 35-watt Workhorse 2 Fluorescent Electronic Ballast, New,
$20.0
Fulham WH2-120-L 35-watt Workhorse 2 Fluorescent Electronic Ballast, New, picture






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