BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-31-2009, 09:18 AM   #1 (permalink)
New Member
 
Join Date: Aug 2009
Model: 9000
PIN: N/A
Carrier: dev
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Custom Control Height Problem

Please Login to Remove!

I have a custom control that extends Field.
I initialize it with the calculated width and height for the place it should be using the following code:
SeparatorField sf = new SeparatorField();
add(sf);
int top = sf.getTop() + sf.getHeight();
int ctrlHeight = this.getContentRect().height - top;
this.myCtrl = new MyListField (ctrlWidth, ctrlHeight);

In the control itself I have
protected void layout(int width, int height)
{
setExtent( this.width, this.height );
}

The problem is with VirtualKeyboard. When It's shown I can get its height to subtract it from calculation and my control occupies half of the screen. When the keyboard is hidden everything is ok.

I feel like I'm doing something very wrong but I don't have a clue what it is. Please help!
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

1x 93LC76/P Microchip Technology IC EEPROM 8KBIT 3MHZ 8 DIP
$1.0
1x 93LC76/P Microchip Technology IC EEPROM 8KBIT 3MHZ 8 DIP picture2PCS AT24C128 SOP8 24C128 EEPROM 128KBIT 1MHZ IC
$0.99
2PCS AT24C128 SOP8 24C128 EEPROM 128KBIT 1MHZ  IC pictureBLK-MD-SPK-B Bluetooth OVC3860 Stereo Audio Transceiver EEPROM V2.0+EDR Module
$3.94
BLK-MD-SPK-B Bluetooth OVC3860 Stereo Audio Transceiver EEPROM V2.0+EDR Module pictureXICOR X28HC64P-12 28HC64 High Speed 8K x 8 EEPROM PDIP28 X 1PC
$3.99
XICOR X28HC64P-12 28HC64 High Speed 8K x 8 EEPROM PDIP28 X 1PC pictureXICOR X28HC64DMB-90 High Speed 8K x 8 EEPROM CDIP28 X 1PC
$29.99
XICOR X28HC64DMB-90 High Speed 8K x 8 EEPROM CDIP28 X 1PC picture






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