CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Prevent dialog closing...

by zsleo » 13 Mar 2019 02:49

I have a Dialog (and also DialogEx) that with some logic checking I want to stop from closing if the user presses ESC or clicks the "X" button.

How do I do this in the OnClose (or other) event?

TIA
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 15 Mar 2019 13:20

Hi zsleo,

Unset the Closable & CloseOnEscape properties, and when you need close it, close it by method.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 15 Mar 2019 20:26

Thanks, but I already know that.

If I there will be 3 or 4 of a about 40 dialogs in the app that will not CloseOnEscape.

I want to avoid that bad app / user experience.
.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by fduenas » 12 Jun 2019 21:07

zsleo wrote:I have a Dialog (and also DialogEx) that with some logic checking I want to stop from closing if the user presses ESC or clicks the "X" button.

How do I do this in the OnClose (or other) event?

TIA


I use this, I normally set it in the OnCreate event of the frame:

MyDialog.JQDialogOptions.Modal := true;
MyDialog.JQDialogOptions.OnBeforeClose.Script:= 'function (event, ui){ return false; }';
fduenas
 
Posts: 124
Joined: 29 May 2012 12:54


Return to JQDialog

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.