1

Possible Duplicate:
Image Button in BlackBerry

i want set images as background of button. but i am not get any idea how it possible so can any one help me for my problem..

Thank you in advance..

Community
  • 1
  • 1
hasmukh
  • 11
  • 3

4 Answers4

1

You'll need to use a BitmapField, set it FOCUSABLE, and then override navigationClick() to execute the FieldChangeListener

jprofitt
  • 10,874
  • 4
  • 36
  • 46
0

Here's the link to official doc http://docs.blackberry.com/en/developers/deliverables/29251/Creating_a_custom_button_1676236_11.jsp

I think it has everything you need plus it will let you know about creating custom objects

Juanma Baiutti
  • 637
  • 1
  • 10
  • 27
0

You have to make a custom field that will contain a bitmap and that will handle the click event or use the BitmapField and set the FOCUSABLE style to it. If you need help in how to create custom fields let me know..

Farid Farhat
  • 2,300
  • 1
  • 16
  • 29
0

It is possible.

    image=Bitmap.getBitmapResource("abc.png");
    one=new ButtonField("One")
    {
        protected void paint(Graphics g) 
        {
            g.drawBitmap(0, 0, image.getWidth(), image.getHeight(), image, 0, 0);
            super.paint(g);
        }
    };
    one.setChangeListener(this);
    hor.add(one);
alishaik786
  • 3,696
  • 2
  • 17
  • 25