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
Developer
Posts: 35
Registered: ‎11-26-2008
My Device: 8100
Accepted Solution

about CONSUME_CLICK

hi,

i have a code like this

-------------

class HellWorldScreen extends MainScreen{
...
    public HellWorldScreen(String pageTitle,String btnLabel,int track,hell obj){

....

myButt = new MyButton(btnLabel,track,obj);

add(myButt);          

    }

}

 ...

 

private class MyButton extends ButtonField implements FieldChangeListener {

...

public MyButton(String btnLabel,int track,hell obj) { ... }

public void fieldChanged(Field field,int context) { ... }

 

...

}

 

...

 

 

so how can i use CONSUME_CLICK here

i have  made button's private class so i cudn't set CONSUME_CLICK

 

please help me

 

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: about CONSUME_CLICK

[ Edited ]

in your constructor, call the super constructor with the "style" parameter.

 

super(btnLabel,ButtonField.CONSUME_CLICK)

Message Edited by RexDoug on 12-11-2008 08:32 AM
Developer
Posts: 35
Registered: ‎11-26-2008
My Device: 8100

Re: about CONSUME_CLICK

thanks

 

worked !!!