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

Biovac Laser Smoke Evacuation Vacuum
Biovac Laser Smoke Evacuation Vacuum pictureGC 5092 Glass Vacuum Tube Bulb Pliers Excellent Condition
GC 5092 Glass Vacuum Tube Bulb Pliers Excellent Condition pictureNew Pfeiffer Vacuum IKR 251 Cold Cathode Gauge, 15-30V, 2W, (PN:PTR25500)
New Pfeiffer Vacuum IKR 251 Cold Cathode Gauge, 15-30V, 2W, (PN:PTR25500) pictureTERRANOVA 935 WIDE RANGE VACUUM GAUGE CONTROLLER
TERRANOVA 935 WIDE RANGE VACUUM GAUGE CONTROLLER pictureBarnant Vacuum Pressure Pump 400-1901
Barnant Vacuum Pressure Pump 400-1901 picture

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