BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 05-02-2007, 09:10 PM   #1 (permalink)
Thumbs Must Hurt
Join Date: Feb 2007
Model: 8100
Carrier: T-Mobile
Posts: 54
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Argggh, there must be a solution to this!!!

Please Login to Remove!

Hi all,

I'm TRYING to get EditFields working correctly side-by-side in a FlowFieldManager. I have them all aligning as I want, but their edit behavior is broken.

Using the roller ball, you can go from field to field, but the cursor never iterates thru the characters in each field, allowing one to correctly edit them.

This same code, using a HorizontalFieldManager works, BUT, I can not get fields on a second line.

Here's a screenshot of what it looks like:

My goal is to be able to properly edit these fields, while maintaining the correct layout.

Here's my class code.

Any and all help is greatly appreciated.

package com.wcs.blackberry;

import net.rim.device.api.system.Characters;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.EditField;
import net.rim.device.api.ui.container.FlowFieldManager;
import net.rim.device.api.ui.container.MainScreen;

import com.wcs.blackberry.util.BBLogger;

// The Sandbox application is a Blackberry Pearl testbed.
public class Sandbox extends UiApplication
  public static void main(String[] args)
    Sandbox theApp = new Sandbox();

  public Sandbox()
    MainScreen screen = new SandboxScreen();

final class SandboxScreen extends MainScreen

  public SandboxScreen()
    super(MainScreen.DEFAULT_MENU | MainScreen.DEFAULT_CLOSE);
    MenuItem menuItem = BBLogger.getShowLogMenuItem();

    FlowFieldManager ffm = new FlowFieldManager(
        FlowFieldManager.HORIZONTAL_SCROLL | FlowFieldManager.VERTICAL_SCROLL);

    ffm.add(new FixedWidthField("abc"));
    ffm.add(new FixedWidthField("def"));
    ffm.add(new FixedWidthField("ghi"));
    ffm.add(new FixedWidthField("jkl"));


  public class FixedWidthField extends EditField
    public FixedWidthField(String string)
      super("", string, 10, Field.FOCUSABLE);

    public int getPreferredWidth()
      return 80;

    public void layout(int maxWidth, int maxHeight)
      super.layout(getPreferredWidth(), super.getPreferredHeight());
      setExtent(getPreferredWidth(), super.getPreferredHeight());

  public boolean onClose()
    return true;

  public boolean keyChar(char key, int status, int time)
    switch (key)
    case Characters.ESCAPE:
      return true;
    return super.keyChar(key, status, time);
Old 05-02-2007, 11:35 PM   #2 (permalink)
Thumbs Must Hurt
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default hi

try this...i am not sure if it works but still....
keep the ALT key pressed when scrolling horizontally.
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

Agilent/HP 81623A photodetector, with 81619A head interface & 8163A mainframe
Agilent/HP 81623A photodetector,  with 81619A head interface & 8163A mainframe pictureTektronix 7603 Oscilloscope Analog Mainframe for 7000 Series Plug-ins - AS IS
Tektronix 7603 Oscilloscope Analog Mainframe for 7000 Series Plug-ins - AS IS pictureWegener Communications Mainframe - 19" Rackmount 3U - Satcom/RF (1601-54 REV A)
Wegener Communications Mainframe - 19Anritsu MP1555B-02-MP0122B-MP0128A SONET/SDH Analyzer Mainframe
Anritsu MP1555B-02-MP0122B-MP0128A SONET/SDH Analyzer Mainframe pictureAndo AQ2202 9 Slot Mainframe
Ando AQ2202 9 Slot Mainframe picture

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