Autosizing EditField

I worked on an EditField autosize intake according to the paint and the value of MaxSize autour rectangle:

the following code works fine online:

EditField EF = new EditField ("",null, 8, EditField.FILTER_REAL_NUMERIC)

{

public layout zero (int width, int height)

{

int x = getFont ().getAdvance("0") * getMaxSize();

Super.layout (x, getpreferredheight ());

setExtent (x, getPreferredHeight ());

} protected void paint (Graphics g)

{

g.setColor (Color.GRAY);

g.drawRect (0,0,getWidth (), getHeight ());

g.setColor (Color.BLACK);

Super.paint (g);

}

};

but when I create a class to extend the EditField, it does not work well (the width is set not right)

public class SizeableEditField extends EditField

{

public SizeableEditField()

{

new EditField();

}

public SizeableEditField (long style)

{

new EditField (style);

}

public SizeableEditField (label As String, String initialValue)

{

new EditField (label, initialValue);

}

public SizeableEditField (String initialValue, label As String, style long ,int maxNumChars)

{

new EditField (label, initialValue, maxNumChars, style);

}

public layout zero (int width, int height)

{

int x = this.getFont (.getAdvance("0")) * this. getMaxSize(); / * get the size of the field in pixels of maxChar * /.

Super.layout (x,this. getPreferredHeight()); / * layout with this space max in mind * /.

setExtent (x,this. getPreferredHeight()); / * together extend the scope for manager.

}

protected void paint (Graphics g)

{

g.setColor (Color.GRAY);

g.drawRect (0,0,this.getWidth(),. getHeight()); g.setColor (color.

BLACK); Super.paint (g);

}

}

call with:

SizeableEditField EF = new SizeableEditField ("",null, 8, EditField.FILTER_REAL_NUMERIC);

The rectangle is painted, but the size is still full hunting, so it seems that x is not calculated on the right.

No idea why? My debugger will let me see the results of the Expression, os, it is difficult to understand.

Thanks for help.

Concerning

I actually found the problem:

I need to call super instead of a new EditField

It works:

public class SizeableEditField extends EditField

{

public SizeableEditField()

{

Super ();

}

public SizeableEditField (long style)

{

Super (style);

}

public SizeableEditField (label As String, String initialValue)

{

Super (label, initialValue);

}

public SizeableEditField (String initialValue, label As String, style long ,int maxNumChars)

{

Super (label, initialValue, maxNumChars, style);

}

public layout zero (int width, int height)

{

int x = getFont ().getAdvance("0") * getMaxSize(); / * get the size of the field in pixels of maxChar * /.

Super.layout (x, getpreferredheight ()); / * layout with this space max in mind * /.

this.setExtent (x, getPreferredHeight ()); / * together extend the scope for manager.

}

protected void paint (Graphics g)

{

g.setColor (Color.GRAY);

g.drawRect (0,0,this.getWidth(),. getHeight()); g.setColor (color.

BLACK); Super.paint (g);

}

}

Tags: BlackBerry Developers

Similar Questions

  • EditField: protected boolean insert (...) not called if the device uses VirtualKeyboard

    Hi all

    I extend the EditField class to intercept the entries of tank / backspaces and do something. I would outweigh all the methods of the superclass:

    protected boolean insert(char arg0, int arg1);
    public int insert(String text);
    protected int insert(String text, int context);
    
    protected boolean backspace();
    protected int backspace(int count, int context);
    public int backspace(int count);
    

    I tried on a 8520 (which has a physical keyboard) and the methods overridden were correctly when you type something in the field. However, this is not the case on a touch device (tried on a 9380). In this case the text is typed and showed correctly in the EditField custom, but not the method above is called never. I am quite confused...

    Is anyone of you know how to insert text in the virtual keyboard in the EditField? Is it possible to intercept these events?

    See you soon,.

    Beto

    The problem with keyChar and keyDown is that the char to insert depends on the keyboard layout, I didn't want to do something that it is already done by RIM.

    However, I have tried those overring however, but keyChar is never invoked, and keyDown gave place to a chariot double inserted in the editfield...

    In the end, I followed a suggestion made by @peter_strange in another post (I'll add the link if I managed to find it again) and put a FieldChangeListener on the edit field. When field changes, if the context is 0 (user action), I check if the text is changed and do what I have to do...

    Thank you.

    Beto

  • ALT + 2 or shift + 2 is not functional in Android EditField

    How do Alt + 2 OR shift + 2 functional in Android EditField component which Alt + 0-9 & SHIFT + 0 to 9 are respectively seized from 0 to 9. Only Alt + 2 & shift + 2 aren't seizes 2 in the EditField on all physical BlackBerry QWERTY devices such as the Q5, Q10, passport, P 9983 & classic.

    Is this a known issue? This hotfix is scheduled to be delivered in the future BlackBerry Runtime for Android update applications?

    This problem seems to occur when the inputType is set to 'numberPassword '. A bug report has been noted so I hope that the issue will be resolved in the future.

    Remove inputType = "numberPassword" will allow you to use the shortcut Alt + e to enter '2', but I guess you want to restrict the EditText to accept only numeric characters.

    At the same time (if you still want to accept numeric characters), do not hold down the shift or Alt to enter '2' with inputType = "numberPassword." You can simply press the 'e' '2 '.

  • EditField colors

    EditField _name = new EditField("Name "+new LabelField("*")
                {
                    public void paint(Graphics graphics) {
                        graphics.setColor(Color.RED);
                        graphics.clear();
                        super.paint(graphics);
                    }
    
                }, "", 100, EditField.FIELD_RIGHT);
    

    Hello, I have to add an EditField with the label: name (*), but the label is all black.

    You add apples and oranges - 'Name' + LabelField simply returns a string with toString() of the LabelField added to the 'name '. You add not any LabelField for any Manager / screen.

    In order to achieve what you want, you can create two zones of labels - one with 'Name', another with a "(*)" and paint the place like you did - followed by the Edit with a label field empty. The main difference between this building and the normal EditField with a label is that this return to the line will not as the 'label', as it does in the EditField. If you don't want word wrap and need a simple line of input, consider the following knowledge base article:

    Code example - moving line text entry field

    It is easy to modify (using two labels with different colors instead of one, for example) and has other ideas in the comments.

    Good luck!

  • EditField drawn with top

    Please, I create a Notepad like application for my blackberry and I would like to create an editfield with lines on it like the one in the picture. I really appreciate your help.

    As mentioned, this is not the standard entry BB method.

    Here is a code to get you going, I just wrote this, it is not tested or compiled.  It may not work.  But you'll get the idea and I'm sure that with the idea that you can operate.

    Update the paint method in the provided article which was the following:

    protected void paint (Graphics g) {}
    Super.Paint (g);
    int prevColor = g.getColor ();
    g.setColor (Color.BLACK);
    g.drawRect (0, 0, getWidth(), getHeight());  draw border
    g.setColor (prevColor);
    }

    to something like this:

    protected void paint (Graphics g) {}
    lineHeight int = this.getFont.getHeight ();
    int lines = this.getHeight () / lineHeight;
    for (int i = 0; i)< lines;="" i++="" )="">
    g.drawLine (0, drawHeight, this.getWidth (), drawHeight);
    drawHeight is drawHeight + this.getFont () .getHeight ();.
    }
    Super.Paint (g);
    int prevColor = g.getColor ();
    g.setColor (Color.BLACK);
    g.drawRect (0, 0, getWidth(), getHeight());  draw border
    g.setColor (prevColor);
    }

    As noted, not tested, not compiled, not really production quality code, but I'm sure you have the idea and can rework it based on yourself...  Let us know how you go with it.

  • Border and background for EditField

    I want to create EditField rounded, white but I use jre 4.5 Blackberry so I can't use:

    myEditField..setBorder(BorderFactory.createRoundedBorder(new XYEdges(2, 2, 2, 2),  0x35586C, Border.STYLE_SOLID));
    

    Because doesn't have class BorderFactory or border.

    I tried to draw a rectangle inside the paint method:

    myEditField = new EditField(){
                public void paint(Graphics g) {
                    super.paint(g);
                    int prevColor = g.getColor();
                    g.setColor( 0xffffff);
                    g.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
                    g.setColor(prevColor);
                }
            };
    

    I look fine, but the problem is that text inserted inside the EditField cannot be seen...

    Call super.paint () after you make your bottom paint. You cover it up with the fillRoundRect. Alternatively, if you are wanting just a border, you can use drawRoundRect().

  • EditField

    Week1 EditField = new EditField ("Enter Time:", "HH");

    Hey guys I want to do only the semicolons in the Editfield above cannot be changed?

    any1 know how to do?

    Thanks in advance.

    Take a look by using the DateField SimpleDateFormat format to match this requirement.

  • remove the editfield line break

    Hi I have a newline removal of difficulty of editfield. The situation is that I have editfield and the user inserts the body of the text.

    When the user clicks on a button, I want all the characters than insert user to show online with no spacing or no line breaks. I used StringUtilities.removeChar (String, "") to remove the empty spaces, but I don't know how to remove line breaks ("feed").

    Please help and thank you!

    Thanks for the suggestion, but I found a simple way using two Editifields!

  • [REQUEST] How EditField auto resizing

    I have a code...

    public class AppMainScreen extends MainScreen implements HttpResponseListener {
        private final String URL = "http://translate.google.com/m?hl=id&sl=id&tl=hi&ie=UTF-8&prev=_m&q=aku+lapar";
    
        public AppMainScreen(String title) {
            setTitle(title);
    
            txtHasil = new EditField("", "", EditField.DEFAULT_MAXCHARS, FOCUSABLE);
                add(txtHasil);
        }
    
        private MenuItem miReadData = new MenuItem("Read data", 0, 0) {
            public void run() {
                requestData();
            }
        };
    
        protected void makeMenu(Menu menu, int instance) {
            menu.add(miReadData);
            super.makeMenu(menu, instance);
        }
    
        public void close() {
            super.close();
        }
    
        public void showDialog(final String message) {
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    Dialog.alert(message);
                }
            });
        }
    
        private void requestData() {
            Thread urlReader = new Thread(new HttpUrlReader(URL, this));
            urlReader.start();
        }
    
        public void onHttpResponseFail(String message, String url) {
        }
    
        public void onHttpResponseSuccess(byte bytes[], String url) {
            string hasil(""+ new String(bytes));
            txtHasil.setText(hasil);
    
        }
    }
    

    When I select the menu item, read, go out like that

    I want to output in editfield

    Please help me, im stuck in Editfield... :'(

    "OnHttpResponseSuccess()" is called on the event Thread?  Try the following in order to ensure that the update of the field is executed on the event Thread

    {public onHttpResponseSuccess Sub (final ubyte bytes [], String url)
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    txtHasil.setText (new String (bytes));
    }
    });
    }

    If this does not work, then please put a try catch around this code to ensure that it is not to throw exceptions.  Let us know what you see.

  • Custom elegant EditField (textbox)

    Hello!

    I was wondering if there is a way to create cute user interface components for our applications. I would like to have something like this:

    But the EditField BB is very very ugly. I tried a custom EditField of (http://www.blackberryforums.com/developer-forum/218757-custom-text-edit-filed-vertical-scroll.html)

    But it looks like this:

    It's completely is and ugly, not decent for any application. For cute, we should override the paint method and draw a Bitmap simulating a cute EditField?

    public void paint(Graphics g) {
        super.paint(g);
        g.drawBitmap(0, 0,50, 50, Bitmap.getBitmapResource("profile.png"), 10, 10);
        //g.drawRect(0, 0, getWidth(), getHeight());
    }
    

    If we paint a Bitmap with the height and width fixed, we will see it very small or big if the resolution is changed? For example, in "BOLD" curve with 320 x 240 or 480 x 360.

    Thank you!

    First of all - there is no built-in component like the one you want.

    Second - the article you mentioned has a very harmful code that would avoid you best. I don't know what drunk monkey for the first time getManager () .invalidate () inside the paint, but this piece of code has found its place in more than one article of the BlackBerry UI on the ' Net. Avoid it like the plague.

    Third - you need paint Bitmap image first, then call the super.paint. Otherwise, your bitmap image is painted on the letters!

    Fourth - indeed, the image will be different on different screens. There is a drawTexturedPath method that allows all sorts of affine transformations and the tiles of the original Bitmap. It is quite effective, but could distort Bitmaps. There is also the drawShadedFilledPath, which creates a sort of background gradient. Finally, there are all sorts of classes useful net.rim.device.api.ui.decor package (available since 4.6).

    And finally, the answer to your first question - Yes, there are several ways to create cute user interface components. Here's the complete code for my experience with rounded edge text boxes (it fate multi-line, scrollable vertically)-you can experiment with colors and other things there.

    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FocusChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.EditField;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public  class RoundBorderTextBoxField extends Manager implements FocusChangeListener {
        private int managerWidth;
        private int managerHeight;
        private int inactiveBorderColor = Color.BLACK;
        private int activeBorderColor = Color.BLACK;
        private int borderColor = inactiveBorderColor;
        private int backgroundColor = Color.WHITE;
        private int arcWidth;
    
        private VerticalFieldManager vfm = new VerticalScrollManager(VERTICAL_SCROLL | USE_ALL_WIDTH | USE_ALL_HEIGHT);
        private EditField editField;
    
        RoundBorderTextBoxField(int width, int height, long style) {
            super(style | NO_VERTICAL_SCROLL | NO_HORIZONTAL_SCROLL);
            managerWidth = width;
            managerHeight = height;
            long innerStyle = style & (READONLY | FOCUSABLE_MASK); // at least
            if (innerStyle == 0) {
                innerStyle = FOCUSABLE;
            }
            editField = new EditField("", "", EditField.DEFAULT_MAXCHARS, innerStyle);
            editField.setFocusListener(this);
            arcWidth = editField.getFont().getHeight() & 0xFFFFFFFE; // make it even
    
            add(vfm);
            vfm.add(editField);
        }
    
        public void setFont(Font font) {
            super.setFont(font);
            editField.setFont(font);
            arcWidth = editField.getFont().getHeight() & 0xFFFFFFFE;
            updateLayout();
        }
    
        public void setBorderColors(int inactive, int active) {
            inactiveBorderColor = inactive;
            activeBorderColor = active;
            invalidate();
        }
    
        public void setBackgroundColor(int bgColor) {
            backgroundColor = bgColor;
            invalidate();
        }
    
        RoundBorderTextBoxField(int width, int height) {
            this(width, height, 0L);
        }
    
        public String getText() {
            return editField.getText();
        }
    
        public void setText(String newText) {
            editField.setText(newText);
        }
    
        public void append(String addedText) {
            String newText = editField.getText() + addedText;
            editField.setText(newText);
            editField.setCursorPosition(newText.length());
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    vfm.setVerticalScroll(Math.max(0, vfm.getVirtualHeight() - vfm.getVisibleHeight()));
                }
            });
        }
    
        public int getPreferredWidth() {
            return managerWidth;
        }
    
        public int getPreferredHeight() {
            return managerHeight;
        }
    
        protected void sublayout(int w, int h) {
            if (managerWidth == 0) {
                managerWidth = w;
            }
            if (managerHeight == 0) {
                managerHeight = h;
            }
            int actWidth = Math.min(managerWidth, w);
            int actHeight = Math.min(managerHeight, h);
            layoutChild(vfm, actWidth - arcWidth, actHeight - arcWidth); // Leave room for border
            setPositionChild(vfm, arcWidth / 2, arcWidth / 2);  // again, careful not to stomp over the border
            setExtent(actWidth, actHeight);
        }
    
        protected void paint(Graphics g) {
            int prevColor = g.getColor();
            int myWidth = getWidth();
            int myHeight = getHeight();
            g.setColor(backgroundColor);
            g.fillRoundRect(0, 0, myWidth, myHeight, arcWidth, arcWidth);
            g.setColor(borderColor);
            boolean aaLines = g.isDrawingStyleSet(Graphics.DRAWSTYLE_AAPOLYGONS);
            g.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, true);
            g.drawRoundRect(0, 0, myWidth, myHeight, arcWidth, arcWidth);
            g.drawRoundRect(1, 1, myWidth - 2, myHeight - 2, arcWidth - 2, arcWidth - 2);
            g.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, aaLines);
            g.setColor(prevColor);
            super.paint(g);
        }
    
        public void focusChanged(Field field, int eventType) {
            if (field == editField) {
                switch (eventType) {
                case FOCUS_GAINED:
                case FOCUS_LOST:
                    adjustBorderColor();
                    break;
                default:
                    break;
                }
            }
        }
    
        private void adjustBorderColor() {
            int nextColor;
            if (editField.isFocus()) {
                nextColor = activeBorderColor;
            } else {
                nextColor = inactiveBorderColor;
            }
            if (borderColor != nextColor) {
                borderColor = nextColor;
                invalidate();
            }
        }
    }
    
  • EditField + BitmapField in a horizontalfield Manager

    Hello

    I use code below to show a field of editing and Bitmap in a horizontal field Manager, but I'm getting illegal state exception...

    If I first add BitmapField and then change the field it works fine but I need Editifield first and then BitmapField

    Below is my code...

      Bitmap bg = Bitmap.getBitmapResource("twenty.png");
      locations = new BitmapField(bg,bg,"Locations");
      EditField table=new EditField("Ticket No : ","",5,EditField.FILTER_NUMERIC)
             {
                    private int iRectX = getFont().getAdvance(getLabel());
                    private int iRectWidth = Display.getWidth() - iRectX - 4;
                    public void paint(Graphics g)
                     {
                                g.setColor(0x000000);
                                g.drawRect(iRectX, 0, 170, 18);
                                super.paint(g);
                    }
             };
    
      HorizontalFieldManager hfm=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
      hfm.add(locations);
      hfm.add(table);
      add(hfm);
    

    I already tried taking two horizontal field to add the edit field in the image in another Manager and added these two leaders in vertical field but no luck...

    I also tried traced table...

    EditFields use the full available width.
    You can crush getPreferredWidth or use a custom presentation:
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

  • EditField Layout

    Hi all...

    I try to crreate a custom editfield

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.FontFamily;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Ui;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.EditField;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class BorderEditField extends EditField {
    
        private Border unFocusBorder = BorderFactory.createBitmapBorder( new XYEdges( 12, 12, 12, 12), Bitmap.getBitmapResource("border.png"));
    
        BorderEditField() {
            super();
        }
    
        BorderEditField(long style) {
            super(style);
        }
    
        BorderEditField(String label, String initialValue) {
            super(label, initialValue);
        }
    
        BorderEditField(String label, String initialValue, int maxNumChars, long style) {
            super(label, initialValue, maxNumChars, style | Field.USE_ALL_WIDTH);
            super.setFont(getTextFont());
            setBorder(unFocusBorder);
        }    
    
        public void paint(Graphics g) {
            g.setColor(Color.BLACK);
            g.drawText(super.getText(), 0, 0, DrawStyle.HCENTER + DrawStyle.ELLIPSIS + DrawStyle.TRUNCATE_BEGINNING, getWidth() - 12);
        }
    
        protected void layout(int width, int height) {
            super.layout(width, height);
        }
    
        private Font getTextFont() {
            FontFamily alphaSerifFamily = null;
            try {
                alphaSerifFamily = FontFamily.forName("bbalpha serif");
            } catch (ClassNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                Dialog.alert(e.getMessage());
            }
            return alphaSerifFamily.getFont(Font.PLAIN, 18, Ui.UNITS_pt);
        }    
    
    }
    

    When I enter a tank that could show more field would create it as a new line, but the text is always on the 1st line

    the 2nd line was empty...

    How the custom editfield does not display the 2nd line? the 2nd line is an empty text

    the text is only 1st line

    Well I found a way to make it work

    protected void layout(int width, int height) {
            super.setExtent(width, height);
            setExtent( isStyle( USE_ALL_WIDTH ) ? width : getPreferredWidth(), getPreferredHeight() );
        }
    
        public void updateScreen() {
            invalidate();
        }
    

    IM, add to the bordereditfield

    but have to invalidate every time I enter a text.

  • EditField listener to check the length of the field

    I have a phone field which is an editfield.

    I could restrict entry to 10 digits in this field to hold mobile digital values.

    But now I want to add an additional post that throws an error dialogue once the user typed a value less than 10 in this area.

    This action must be triggered as soon as the user has typed something and went to the next field.

    Here is my code:

    LabelField lbl1 = new LabelField(" Phone No:            ");
    
           final EditField TextField2 = new EditField("", "", 10, 0)
           {
              //Some statements
           }
    
    TextField2.setChangeListener(new FieldChangeListener()
            {
              public void fieldChanged(Field field, int context)
              {
                  if(TextField2.getText().length() < 10)
                              System.out.println("Please enter a valid 10 digit mobile number!");
              }
            });
    

    Help, please. Thank you.

    As @simon_hain said, let me quote myself: "you must override the onUnFocus method.

    protected void onUnfocus(){  if(getText() == null || getText().length() < 10)    Dialog.alert("Text too short!");}
    
  • EditField specific text in bold

    Hello

    I want "BOLD" of specific letters in my EditField.

    public void changeToBold() {}
    try {}
    alphaSans = FontFamily.forName ("without BBAlpha");
    Police = alphaSans.getFont (Font.BOLD, 9, Ui.UNITS_pt);
    editField.setFont (do);
    } catch (ClassNotFoundException e) {}
    Dialog.Alert ("Alert");
    }
    }
        
    public void changeToPlain() {}
    try {}
    alphaSans = FontFamily.forName ("without BBAlpha");
    Police = alphaSans.getFont (Font.PLAIN, 9, Ui.UNITS_pt);
    editField.setFont (do);
    } catch (ClassNotFoundException e) {}
    Dialog.Alert ("Alert");
    }
    }

    I add the text to the EditField since a sqlite database.

    While (C1. Next() & {c2.next ()}
    R1 = c1.getRow ();
    R2 = c2.getRow ();
    Temp = r2.getString (0);
             
    changeToBold();
    Letexte += temp;
    changeToPlain();
    Letexte += r.1getString (0);
    }

    * Maybe there is a way to create a LabelField, which contains the text I want to "BOLD", and then add it at the same time to the EditField?

    Thank you

    You can do this by using a RichtextField.

    The text of a RichTextField

    http://supportforums.BlackBerry.com/T5/Java-development/format-text-in-a-RichTextField/Ta-p/445038

  • EditField automatic extension to a certain height without wordsearch

    CustomEditField wjroke = new CustomEditField(){
    
     public int getPreferredHeight(){
       int h = Font.getDefault().getHeight()* 3;
       //setting the height of edit field as 3 rows
      return h;
     }
    
     public void layout (int width, int height){
    
       super.layout (width, height);
    
       if (getExtent().height < getPreferredHeight()){
           setExtent (width, getPreferredHeight());
       }
     }
    };
    

    THA above code autogrows a custom change the field, but I'd like to stop after a specific height (say 20) has been reached. I tried putting this after

    else{
      setExtent(width, 20);
    }
    

    This kind of work, but when it gets to the height that it hides the words.

    I want to increase the editfield stop but at a certain height, without the words hidden due to the height restriction. Any help will do

    "I want to increase the editfield stop but at a certain height, without the hidden words.

    You mean you want to stop the user entered input when the field has reached a certain size?

    I suspect that the number of characters the user can enter will depend on the phone, the language, the case and the font used, therefore will vary from user to use.  For me, this does not sound like a good user experience.

    Maybe you want to restrict the place occupies the field on the screen, but allow the user to scroll through their text within this space.  If so, this article should help:

    http://supportforums.BlackBerry.com/T5/Java-development/TextBoxField-revisited/Ta-p/548410

Maybe you are looking for

  • Satellite A300 - value added Package installation fails

    Hello I'm running a new Satellite A300, Vista Home Premium.I wasn't able to run PC-diagnose and volume button wasn't working so I uninstalled the existing extra value package, rebooted the system and tried to reinstall the latest version. The install

  • What is the difference between ram high and low density?

    I have an ibm x 3455 7984. high density RAM will it work? If so, it will affect the speed for virtual machines?

  • no code

    I put my computor in the shop to restore my system. they did not put my system in they put in an another even thouth I gave them the recovery disc. How can I remove or erase my hard drive to restore my computer to factory setting.      P.S. the syste

  • After Windows7 SP1, sleep = "unexpected stop.

    On my system quad i7 since the Windows7 Pro SP1 update, whenever my system goes to sleep, he gets an "unexpected stop. How to solve this?The system log contains:The computer was restarted after a bugcheck.  The bugcheck was: 0x000000a0 (0xffffffffc00

  • How can I organize my Photos in one place?

    original title: My Photos are everywhere in my computer how to gather all and put in one place? Well, my photos are everywhere I want to search for and collect only my photos and get rid of all the messages in my library of images? is there a magicia