07-29-2008 07:50 AM
Solved! Go to Solution.
07-29-2008 10:29 AM
You can simply use the style: BitmapField.FOCUSABLE when you create the field.
This will make it focusable when you scroll.
However you have to remember one thing. The field may be already focusable, but you do not see it visually. In this case you need to draw a box around the image or use a different image for when the field has focus. This is done by overwriting the onFocus() and onUnfocus() methods.
07-29-2008 11:07 AM - edited 07-29-2008 11:08 AM
The following developer knowledge base article has an example of how to display focus changes. Note that you will need to BitmapField.FOCUSABLE style.
How To - Show focus changes using BitmapField
Article Number: DB-00427
Or you can use an image with tranparent regions. These will be highlighted when the field has focus.
07-30-2008 01:24 AM - edited 07-30-2008 02:54 AM
hi all
Bitmapfields are already focused i get focus from onfocus() overriding method but i cant see visually so i try to draw a rectangle over the field using drawfocus.. but bitmap field wont focused
protected void drawFocus(Graphics graphics, boolean on) { XYRect rect = new XYRect(); getFocusRect(rect); graphics.setColor(Color.RED); graphics.setDrawingStyle(Graphics.DRAWSTYLE_FOCUS, true); drawHighlightRegion(graphics, Field.HIGHLIGHT_FOCUS, on, rect.x, rect.y, rect.width, rect.height); }
how to draw a box over the field?
07-30-2008 10:07 AM