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
Developer
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified
Accepted Solution

remove bitmap

Hi guys,

 

1) I have a bit map field to which Ii set the bitmap usingthis method

 

 

imageField_2.setBitmap(image_2);

 

 

Now when no bitmap is available i want to show an empty bitmap or no image

 

mageField_2.setBitmap(null); 

 

 

but the problem is previous bitmap remains even though i set this bitmap to null. What should I do ?

 

 

 2)I have added object choice field my screen. On BB storm this object choice is not clickable. I mean I dont get a drop down list or "Change opotion" in menu. How ever I can change options using "Spacebar" of virtual keyboard. what should be done?

 

 


       ObjectChoiceField interValField = new ObjectChoiceField("my field",
                myStringArray, 0, ObjectChoiceField.USE_ALL_WIDTH
                     );

 

 

thanks a lot for any help in this regard,

 

regards,

 

yosoh

 

 

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: remove bitmap

1) I normally delete the Field to do this.  I would suggest that you invalidate() on the Field after having removed the Bitmap, so you would code:

imageField_2.setBitmap(null); 

imageField_2.invalidate(); 

 

2) Don't understand (2).  Have you recompiled the application using JDE 4.7 or associated component pack?  Are you running in compatibility mode?  (Blue border with keyboard always showing?)

Developer
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: remove bitmap

hi peter_strange,

 

thanks for the reply. 

 

1) I cannot call invalidate method directly as it is not visible.Anyways, I solved it my removing and adding fields

 

2) regarding second solution was my silly mistake, I was overriding navigationClick method for other object choice fields in the mainscreen and i returned true all the time instead of invoking super.navigationClick.

 

regards,

 

yosoh.

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: remove bitmap

Excellent, can you mark this as solved then?