Making important windows like notify, confirm?

BlitzMax Forums/MaxGUI Module/Making important windows like notify, confirm?

BlitzProg(Posted 2011) [#1]
On many softwares, when a window have priority above all others, such as confirming something or setting options, if you attempt to select any other one, the window will beep and flash repeatedly and stay on top of the others, and prevent you to gain any access to the back menus.

That's right, I can only do these things with confirm/notify, any other way to have it occurs in MaxGUI? (without cheating by disabling everything and use activate window everytime)


jsp(Posted 2011) [#2]
There is no modal dialog flag if you are looking for it, on the other hand modal dialogs are often not needed or does restrict the user without a certain need, but they are only used because it is easier to program.
So if possible avoid them.

Having said that sometimes you really must have it...
The solution depends on the code structure you use.
When you use a standard WaitEvent() loop, where all you gadgets are managed then create another WaitEvent() loop which becomes active when the window in question is shown/activated.

In that second WaitEvent loop you only process the events of that certain window, for example the proceed button or whatever you have on top. When clicked you would hide that window and go back into your normal main loop.


SebHoll(Posted 2011) [#3]
Disabling a parent window with a child window shown should make the child window modal with respect to the parent.


TaskMaster(Posted 2011) [#4]
I would not say there is no need for modal windows. There are many uses for them.


jsp(Posted 2011) [#5]
Disabling a parent window with a child window shown should make the child window modal with respect to the parent.

Yep, but only to that parent. I assumed GG is using several windows as he wanted to avoid disabling everything and in that case you could select any other window.

I would not say there is no need for modal windows. There are many uses for them.

For sure there are uses, no doubt. So I would not say 'many'.
I am with this guy here at stackoverflow:
Why are modal dialog boxes evil?

May have a look at it.


BlitzProg(Posted 2011) [#6]
Disabling a parent window with a child window shown should make the child window modal with respect to the parent.


This is exactly what I needed. Works wonder. I can't believe i didn't try this earlier... thanks :)

they are only used because it is easier to program.
So if possible avoid them.

I did make an ugly work-around that also worked. My point isn't to be cheap but to prevent the user to perform useless actions that would only be annoying from a programmer point of view. ;)

Last edited 2011