Run a window as a modal dialog?

Posted by James Palmer on 09-Dec-2015 02:18

Can't believe this is something I've not tried to do before, but there you are. We don't tend to use many dialogs, but I've come into a situation where an existing non-modal window may need to be called from a modal dialog. As a result, it pops behind the dialog and you can't interact with it. Is there a simple trick to run the non-modal screen modally, or do I need to duplicate it as a modal dialog ?

Progress 11.5.1.

All Replies

Posted by Mike Fechner on 09-Dec-2015 02:23

Familiar with GUI for .NET?

Embed the Window in a .NET Form and ShowDialog() that Form.

Posted by James Palmer on 09-Dec-2015 02:27

Have never touched GUI for .NET :(

Posted by Laura Stern on 09-Dec-2015 08:09

Hate to say it, but it sounds like a bad design to me.  The contents of a non-modal window and a dialog are usually different.  i.e., A dialog should have an obvious way to close it other than hitting the X on the window header, like an OK or Close button.  Non-modal windows normally use a different style.

Having said that, yes, in classic ABL GUI you need two different frames, but you can have an include file for the guts of the frame definition so you can reuse it if that's what you really want.  The only thing different is the VIEW-AS DIALOG-BOX phrase.

But also, for a dialog you would want a new WAIT-FOR and for a non-modal window you should NOT have a new WAIT-FOR.  So again, you would need to parameterize the code to accomplish this or use different code.

This thread is closed