fljdave Posted March 16, 2014 Share Posted March 16, 2014 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. Quote Link to comment
Dieter @ DWorks Posted March 16, 2014 Share Posted March 16, 2014 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. Quote Link to comment
fljdave Posted March 16, 2014 Author Share Posted March 16, 2014 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. Quote Link to comment
Dieter @ DWorks Posted March 16, 2014 Share Posted March 16, 2014 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. Quote Link to comment
Recommended Posts
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.