04-07-2009 02:59 AM
I don't see why you couldn't use a ButtonField and override drawFocus and onUnFocus or whatever those functions are to draw a bitmap or something in there.
Likewise, you could use the Custom one.
Again, the BitmapField works good too, but I prefer to use that as a canvas type Field.
I haven't really thought about this one. I just assumed that you could put an image in a ButtonField.
I'll have to look at this more closely tomorrow as I need to do this too (just haven't gotten there yet).
04-07-2009 04:08 AM
Yeah, I had a look at it. But even in the sample app, the click on the Picture Button works but the event also fires when I click outside the button!!! How can I fix that???
Try clicking on the button first, an then outside the button! Thats strange!
04-07-2009 04:22 AM
if you're just clicking the screen again after having clicked your imagebutton once, the focus is still on the bitmapfield and so that focused element is what gets triggered by the click. you'll notice that if you use the touchscreen to set focus on some other element, then click, it won't trigger again.
so here's what i do: in my navigationClick() override method, the last thing i do is just call setFocus() on some other element (such as my editfield) so that any button clicks won't actually trigger anything.
04-07-2009 04:23 AM
"Try clicking on the button first, an then outside the button!" Outside the button means, do you have any other Fields in the screen.
It works for me as expected. You can try giving the style as ButtonField.Consume_Click.
04-07-2009 04:26 AM
It seems you have some other fields also.. In the listener, check a condition on which component has raised the event..
04-03-2014 11:04 AM
Hi I have a problem to add image with text in button field using java. It is possible to do using c++.
Please can any one help me.
Here is c++ plus QML link : https://developer.blackberry.com/native/reference/
I want to do the same using java.
04-03-2014 12:04 PM - edited 04-03-2014 04:25 PM
Welcome to the forums.
I think Mark has already answered your question, in this post: