How to set focus to Fieldmanager in blackberry?

How to set focus to FieldManager in BlackBerry?

  • How to draw focus to a VerticalFieldManager in BlackBerry. I have tried this but not working. VerticalFieldManager vv=new VerticalFieldManager(Manager.focusFOCUSABLE);

  • Answer:

    You can try calling Field.setFocus on it, but since a manager is a container, I'm not sure you are going to see "the focus" over it. If it doesn't work, you can try also overriding the paint method and draw your own custom focus when isFocus returns true.

saikumar at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

try this - VerticalFieldManager vv=new VerticalFieldManager(FOCUSABLE); then add items to the vv.

Signare

this is the way to do it: VerticalFieldManager vv=new VerticalFieldManager(FOCUSABLE) { protected void paintBackground(Graphics g) { int prevColor = g.getColor(); int bgColor; if (isFocus()) { bgColor = Color.Blue; } else { bgColor = Color.White; } g.setColor(bgColor); g.fillRoundRect(0, 0, getPreferredWidth(), getPreferredHeight(), 0, 0); g.setColor(prevColor); } public void onFocus(int direction) { super.onFocus(direction); this.invalidate(); } public void onUnfocus() { super.onUnfocus(); this.invalidate(); } }; _focusAnchor = new NullField(FOCUSABLE); add(_focusAnchor);

mrabooode

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.