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
jssantosh84
Posts: 94
Registered: ‎05-29-2010
My Device: 9000 bold
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

 

 

Please use plain text.
Developer
KushBB
Posts: 374
Registered: ‎04-07-2010
My Device: Bold 9000

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
Please use plain text.
Developer
Ekansh
Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm

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.
Please use plain text.