Question EditField and border

Hello!

I had a problem of design. I did something I thought I would work, but I think that I am so close to get it. I have 2 is the image I updated my EditField as boder when unfocus the image has a WHITE background and what door another color. I have a few lines in unfocus and the development of the code field method and I put the border with these images. But when I run on the Simulator, the field has a white rectangle inside. So, I added a few lines and I put a background color when the field is developed. But I got something like that.

Unfocus:

Focus:

How can I erase this white part? or maybe is there something I have missed?

I hope you help me!

Concerning

Hello! Thanks for your review!

Well, I create a custom EditField and here is a part of the code:

    private int mHColor = -1;
    public void setHightlightColor(int color) {
        mHColor = color;
    } 

    protected void onFocus(int direction) {
        invalidate();
        setBorder(BorderFactory.createBitmapBorder(new XYEdges(4, 7, 4, 7),Bitmap.getBitmapResource("img/box.png")));
    }

    protected void onUnfocus() {
        invalidate();
        setBorder(BorderFactory.createBitmapBorder(new XYEdges(4, 7, 4, 7),Bitmap.getBitmapResource("img/boxu.png")));
    } 

   public void paint(Graphics g) {
      if (-1 != mHColor && getManager().isFocus()) {
         g.setBackgroundColor(mHColor);
         g.clear();
      }
      int prevColor = g.getColor();
      g.setColor(prevColor);
      g.clear();
      g.setGlobalAlpha(200);
      super.paint(g);
    }

And in my screen, I called like this:

   _inputField.setHightlightColor(0xFFFFBD);/// FFE9AF
   _inputField.setBorder(BorderFactory.createBitmapBorder(new XYEdges(4, 7, 4, 7),Bitmap.getBitmapResource("img/boxu.png")));

You see how I use a bitmapborder. I create 2 images: one with white background and one with yellow background.

I hope you can help me!

Kind regards.

PS: I use 4.6.0 SDK

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Need drivers of Windows XP Home for Satellite L30

    Hello I was wondering if someone could help me. I bought a Toshiba Satellite L30 - 10V recently which came with Vista installed and ran incredibly slow. I installed a version of XP on it. Could someone provide me with the XP drivers for this laptop o

  • MACRO for CANON 70 d

    Hello, please I have a new Canon 70 d and I am a user of semi-professional hobby. Could you please recommend me a Macro lens to buy? Don't want the most expensive/professional but has some great ideas to create great photos of some insects and flower

  • Taste versehentlich einen (Acer Aspire VN7)

    ICH habe heute eine aus dem Acer Aspire VN7 einen taste. Nun Habe ich das problem dass ich sie nicht wieder reinbekomme. Konnte mir bitte someone tell wie ich die einbaue taste? Um Hilfe, ich ware really very thankful.

  • ACS on the wan?

    We have two ACS 5.2. could put us primary ACS to secondary AEC in large office and AC (they connect to WAN)? So in this case, we have still the wan between HQ and branch primary failure or failure to use ACS for authentication in branch Thank you Duy

  • Conference CME v9 SLBA Adhoc (more than 3 games) for SIP phones 99xx

    HI, does anyone know if MultiPary Adhoc Conference for more than 3 parties for SIP phones (like 9951) is supported in CME v9? I have a GUY working with CSPC and SIP phones. Conference to several ad-hoc (with more than 3 parties) works perfectly when