How to show interactively a question to the user

All graphical and user interfaces problems
Post Reply
manumart1
Posts: 67
Joined: Tue Sep 17, 2013 6:25 am

How to show interactively a question to the user

Post by manumart1 »

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
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: How to show interactively a question to the user

Post by Ivan Denisov »

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
manumart1
Posts: 67
Joined: Tue Sep 17, 2013 6:25 am

Re: How to show interactively a question to the user

Post by manumart1 »

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)
Post Reply