Jump to content
Developer Wiki and Function Reference Links ×

set OK button to not terminate dialog


fljdave

Recommended Posts

Hi, new forum member here. Just upgrading to VW2014 from VW8.5, and trying to re-vamp some old scripts. Boy, dialogs have changed!

According to the Function Reference for RunLayoutDialog, "If you want to prevent a dialog from terminating after someone has clicked on the OK button, set item equal to -1."

Set what item to -1? How?

TIA for any help.

~Dave.

Link to comment

When the event handler is run (on each event), you get an item and data variable with it. Set that item to -1, so VW doesn't close the dialog.

I wonder what you are trying to do? Are you checking the fields if they are correct and if not, you want the user to correct them? This can be done differently and more user friendly. Let me know if you want further info.

Link to comment

Aha! I got it! Within the Case..Of statement:

CASE item OF

1: BEGIN

item := -1;

{some other stuff};

END;

END;

I am using the dialog to add/update record data to multiple objects. I want to be able to pass the next object to the dialog using the OK button as a NEXT button, and I want that button to be the default action when I hit ENTER on the keyboard.

Thanks for the help.

Link to comment

Personally I think it is more user friendly to add an extra button to go to the next item and have the ok button as some sort of finish button. Or you could use your cancel button as the finish one. Now I think about it, for a tool that sets things, it should be really good, you than have 'Save and next' and 'Finish'. Good thinking.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...