03-08-2011 10:00 AM
Hi,
Following is my scenario.
I am using blackberry 8900 and rendering a chart by the painting using a graphics class. And need to select the specific region of the chart say bar graph contains three bars. i want to select the first bar. Since 8900 is a non-touch device i am creating a custom cursor by repainting a bitmap of cursor image. When i call a screen i am getting only the bitmap not the graph.
How to handle this scenario. Any suggestion on this.
Thanks in Advance
03-08-2011 11:19 AM
It seems like you are calling graphics.clear() just before you paint the cursor.
03-09-2011 12:49 AM
I am not using graphics.clear() method but still i am facing the same issue
03-09-2011 12:45 PM
Can you show us your code for painting?
03-09-2011 06:49 PM - last edited on 03-09-2011 06:52 PM
I have had some success in drawing a cursor, by overriding the paint method for the Screen, calling super.paint and then painting my cursor. this does however require that you know where you cursor is and invalidate the old are whenever you move it. Not trivial.
I'm wondering whether for you a better option might be to indicate 'focus', so that the "current" chart changes in some way to indicate it is the currently selected one - perhaps the other ones are partially transparent (one trick I have used). Then you have to know where focus is and act accordingly, but the same is true when you use a cursor.
Just a thought.
Edit - Similar Thread: