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
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:
- How to set focus on top item?Best solution by msdn.microsoft.com
- How to set up blackberry email?Best solution by Yahoo! Answers
- Can I set a password on my Blackberry Curve?Best solution by ChaCha
- How do I set up email on my blackberry curve 8520?Best solution by blogs.blackberry.com
- How to set up Blackberry Data Service?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.