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: 94
Registered: ‎05-29-2010
My Device: 9000 bold
My Carrier: asfas
Accepted Solution

Dialog.D_YES_NO

i am using the following code

 

Dialog d=new Dialog(Dialog.D_YES_NO, "Do u want to change your password", Dialog.YES, null, FOCUSABLE);
d.doModal();
d.setChangeListener(this);

 

I want to do some task on pressing the yes button on this dialog. Can any body guide me how to do this

 

 

Developer
Posts: 374
Registered: ‎04-07-2010
My Device: Bold 9000
My Carrier: Airtel

Re: Dialog.D_YES_NO

[ Edited ]

 

Hi,

 

Try this... Probably it will help....

 

 int response = Dialog.ask(Dialog.D_YES_NO, "Do u want to change your password??");
 
 if(response == Dialog.YES){    
 
  //Your Event on Yes
} 
 

 

 

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Highlighted
Developer
Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: Dialog.D_YES_NO

Hi,

 

You can do code like this :

 

if (Dialog.ask(Dialog.D_YES_NO, "Select Any!!!", Dialog.NO) == Dialog.YES) 
{
   //YES Coding
}
else
{
   //No Code
}

 

 

Thanks

Ekansh

----------------------------------------------------------
feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.