Nitesh Meshram
Nitesh Meshram

Reputation: 555

Is there focus and lost-focus event on black berry sdk?

I am very new developer for black berry environment. Is there a focus and lost-focus event for the controls which are currently selected or deselected?

Please give me some like or example.

Thank you.

Upvotes: 1

Views: 185

Answers (2)

Remy Lebeau
Remy Lebeau

Reputation: 598424

If you are writing your own custom field, or want to catch the events of your Screen class(es), then you would override the virtual Field.onFocus() and Field.onUnfocus() methods.

If you want to catch focus events of other fields, then you have to implement the FocusChangeListener interface and then call the Field.setFocusChangeListener() method of those fields.

Upvotes: 5

Vit Khudenko
Vit Khudenko

Reputation: 28418

Yes, these are Field.onFocus(int direction) and Field.onUnfocus(). Check the API for details.

Upvotes: 3

Related Questions