From: Stephen Kellett Date: 2005-09-14T22:46:33+09:00 Subject: Re: TkDialog question In message , Stephen Kellett writes >ret = TkDialog.new('title'=>'Confirm Exit', > 'message'=>'Are you sure you want to exit?', > 'buttons'=>['Yes', 'No'], > 'default'=>1, > 'bitmap'=>'question') > >How do I get the answer? Did the user press Yes or No? Solved the problem. ret.value() will return the index of the button pressed. In the example above that is: Yes == 0 No == 1 So the code would be: If ret.value() == 0 # user pressed Yes TkRoot.destroy(); end You can also use ret.name() to get the name of the button pressed. Stephen -- Stephen Kellett Object Media Limited http://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting