How to set tooltip to BitmapField?
I have one bitmapfield i need to set tooltip for this. I tried this by overriding drawFocus() method in BitmapField but i dont know much about Graphics class. How i can do this please let me know if you having any sample code please send it to me. Advanced Thanks.
Please provide help i was strucked here.
Did you read the API docs?
Sounds like you are in the right place. Use drawText() in the Graphics class to display the tip. You might want to do a "fill" so that the text has an opaque background.
Of course, the drawback of your strategy here is that you can only paint within the extent of the BitmapField if you use this field paint() or drawFocus() methods. If you want the tip to appear elsewhere, you'll have to override the paint() method in the field's container (Screen).
Thanks alot for your reply.
As per you exactly i structed at extending the size of the tooltip because i am overriding drawFocus(). As per your suggestion i will going to override paint() of MainScreen for displaying large tooltips. FYI i am using below drawFocus() now.
protected void drawFocus(Graphics graphics, boolean on)
XYRect xy = graphics.getClippingRect();
graphics.drawText("news profiles", 5, 15);
|All times are GMT -5. The time now is 02:43 PM.|
Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.