Posted By

shiningdev on 03/22/10


Tagged

dialog


Versions (?)

mel - interaction - 2-button dialog code


 / Published in: Mel
 

URL: http://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/GUI_dialogs.html

2-button dialog code

  1. {
  2. // create a confirm dialog with a yes and no button. Specif
  3. $response = `confirmDialog -title "Confirm"
  4. -message "Yes or No? It's your choice..."
  5. -button "Yes"
  6. -button "No"
  7. -defaultButton "Yes"
  8. -cancelButton "No"
  9. -dismissString "No"`;
  10. // check response
  11. if( $response == "Yes" ) {
  12. print("User says yes\n");
  13. } else if( $response == "No" ) {
  14. print("User says no\n");
  15. }
  16. }

Report this snippet  

You need to login to post a comment.