Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold
Accepted Solution

Custom list field problems with lost focus

Hello experts!

 

I did a custom list field, when i draw the rows, i did some solution using an custom callback, well.. i have a problem when the list field lost the focus, because when i have a focus on button my list have a last item focused.

 

I want to erase it,,,

 

 

Any sugestions?

 

Regards, Rampelotti

Regular Contributor
Posts: 71
Registered: ‎07-11-2010
My Device: Bold 9000

Re: Custom list field problems with lost focus

Try overriding onUnfocus

 

 

protected void onUnfocus()
{
  super.onUnfocus();
  invalidate();
}

 

 


-----
A good decision is based on knowledge and not on numbers.
Regular Contributor
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold

Re: Custom list field problems with lost focus

Thank you for reply Plato!

 

But it doesn´t work...

 

Any suggestions?

 

Regards, Rampelotti.

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm

Re: Custom list field problems with lost focus

can u tell us the device and the opearting system on which u r working?

Regular Contributor
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold

Re: Custom list field problems with lost focus

[ Edited ]

Yeah, my device is a blackberry 9000 Bold and work with OS 4.6

 

Regards, Rampelotti.

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm

Re: Custom list field problems with lost focus

how u say that ur listfield last item has focus :

do u see the blue focus color on it or u found that from selected index.

 

or u mean to say that focus does not comes on the button field added after listfield

may be i dont understand ur ques

Developer
Posts: 70
Registered: ‎01-02-2009
My Device: Not Specified

Re: Custom list field problems with lost focus

in drawListRow() method add the below before draw.

 

 

if(graphics.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS))

 

---------------------
Best Regards,
Kannabiran.
---------------------
Don't forget to mark your post as solved if you got answer. And give kudos.
Regular Contributor
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold

Re: Custom list field problems with lost focus

   Hi!

 

   I was talk about when my field lost the focus, it have the row drawed with focus yet, but my focus are on other field.

 

   How to fix it?

 

   Regards, Rampelotti

Regular Contributor
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold

Re: Custom list field problems with lost focus

Hello Kanna!

 

It is only for draw focus right?

 

To draw focus i did some comparision with selected index and drawing with fillrect with any color...

 

Regards, Rampelotti.