How to show interactively a question to the user

All graphical and user interfaces problems

How to show interactively a question to the user

Postby manumart1 » Wed Nov 26, 2014 11:26 am

Dialog.ShowMsg shows a message to the user on the log window and on the status bar; I have not been able to see a separate small dialog box with the message, even I closed the log window, but that is not my problem now.

My problem is:
I want to show a question to the user onto an small modal window or dialog box, so that he could answer Yes or No. Something like this:
Code: Select all
IF file exists THEN
  resp := Confirm("The file already exists. Do you want to ovewrite it?");
  IF resp = FALSE THEN
    RETURN
  END
END

I have not found a way to achieve this.

Thanks in advance
manumart1
 
Posts: 67
Joined: Tue Sep 17, 2013 6:25 am

Re: How to show interactively a question to the user

Postby Ivan Denisov » Wed Nov 26, 2014 4:30 pm

Code: Select all
IF file exists THEN
  Dialog.GetOK("The file already exists. Do you want to ovewrite it?", "", "", "", {Dialog.yes, Dialog.no}, resp);
  IF resp # Dialog.yes THEN
    RETURN
  END
END
User avatar
Ivan Denisov
 
Posts: 283
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: How to show interactively a question to the user

Postby manumart1 » Wed Nov 26, 2014 7:23 pm

Many many thanks, Ivan.

Also I see that to show an explicit message to the user, instead of Dialog.ShowMsg I must use:
Code: Select all
Dialog.GetOK("Operation correctly performed", "", "", "", {Dialog.ok}, resp)
manumart1
 
Posts: 67
Joined: Tue Sep 17, 2013 6:25 am


Return to GUI problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron