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

BlackBerry® World™ Development

Reply
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Click event on the Custom button

Hi all, i need your ideas to make my app more interactive.

 

    I created a custom button, display an image instead of the native button. i extended it from the Field class. i used it in my CustomManager class. i write a clickevent in the manager class using fieldChanged(Field, int); i defined the navigationclick method ifrom which i pass fieldchangenotify(1); method in the custom butttonclass.

 

              now the problem is, when i clicked on the manager the click event is catching... the click event is catching when i clicked on the custom button or the manager, and on teh other controls also. i need to catch the click of teh custom button only. how can i do that?? can i have any samples on it. i need to catch the clickevent of the custom button only.

 

 

 

 

 

have a nice time

Thanks and Regards,
PraveenGoparaju.
Highlighted
Developer
Posts: 60
Registered: ‎03-06-2009
My Device: Not Specified

Re: Click event on the Custom button

Are you using the same listener with your button that u r using for all other controls? If yes then, you can either do a instanceof to check if the field is an instance of your custom button class, or you can also create a new Fieldchange listener specifically for your button.

 

Hope this solves your problem.

 

Thanks

Deepanjan