BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 04-27-2009, 08:01 AM   #1 (permalink)
New Member
Join Date: Mar 2009
Model: 9000
Carrier: Rogers
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ButtonField Wierdness on Storm

Please Login to Remove!

Have put 2 ButtonFields into a HorizontalFieldManager and am repositioning this on the screen using sublayout override. Buttons respond to scrolling, and enter key press, but one of them is not responding to screen touch. The other button responds correctly. Problem goes away in the containing HorizontalFieldManager is not re-positioned, or if the button's preferred width is set to be a large value (eg. > 50 pixels). From what I can tell, setPositionChild is causing the problem - but I can't understand why.

Has anyone seen this before? I am including code just in case there is something really basic I am missing.


public class TestScreen extends MainScreen {

ButtonField aBut1 = new ButtonField("<", ButtonField.CONSUME_CLICK);
ButtonField aBut3 = new ButtonField(">", ButtonField.CONSUME_CLICK );

public TestScreen() {

VerticalFieldManager vfm = new VerticalFieldManager(NO_HORIZONTAL_SCROLL |

protected void sublayout(int maxWidth, int maxHeight) {

super.sublayout(Display.getWidth(), Display.getHeight());

int iCount = getFieldCount();

for (int i = 0; i < iCount; i++) {

Field aField = getField(i);

layoutChild(aField, maxWidth, Display.getHeight());

if (aField instanceof HorizontalFieldManager) { // reposition hfm

setPositionChild(aField, (Display.getWidth() - aField.getWidth()) / 2, Display.getHeight() /2 );
setExtent(Display.getWidth(), Display.getHeight());

HorizontalFieldManager hfmButt = new HorizontalFieldManager();

LabelField label = new LabelField("label text");





FieldChangeListener choseListener = new FieldChangeListener() {

public void fieldChanged(Field field, int context) {


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

AMAT 75% OFF NEW* 1350-00683 Capacitance Manometer, Pressure Transducer, 423468
AMAT 75% OFF NEW* 1350-00683 Capacitance Manometer, Pressure Transducer, 423468 picturePhilips S5-1 Sector Array US Probe Transducer IE33
Philips S5-1 Sector Array US Probe Transducer IE33 picture Current Transducer CE-IB04-35A2-1.0/±50A DC
 Current Transducer CE-IB04-35A2-1.0/±50A DC  pictureISO-NS0064 Power Lynx Transducer
ISO-NS0064 Power Lynx Transducer pictureSiemens 7ME39501LP00 D1H Sensor Dedicated Transducer
Siemens 7ME39501LP00 D1H Sensor Dedicated Transducer picture

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