Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
grevolution
Posts: 15
Registered: ‎07-27-2009
My Device: Not Specified

Update the diplay from a Button Click.

HI i want to change a bitmap with a button click . how i can do that ??? this is my code

 

 

class ResultScreen extends MainScreen {
Bitmap _b = Bitmap.getBitmapResource("search-screen-1.png");;
public ResultScreen(){
_m = m;

//t.start();
//add(new LabelField("Image is coming."));


BitmapField bf = new BitmapField(_b);

add(bf);

ButtonField bt = new ButtonField("click");
bt.setChangeListener(new FieldChangeListener(){
public void fieldChanged(Field f , int context){
_b = Bitmap.getBitmapResource("background_.png");
updateDisplay();
Dialog.alert("dddd");
}
});

add(bt);
}
}

 

 

 

 

Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Update the diplay from a Button Click.

Have you tried with calling:

invalidate();

 

Regards

Bikas

New Developer
grevolution
Posts: 15
Registered: ‎07-27-2009
My Device: Not Specified

Re: Update the diplay from a Button Click.

yes it doesnt work
Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Update the diplay from a Button Click.

Can you clear your requirement a bit.

Exactly what are you trying to get.

 

Regards

Bikas