PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Changing a window's type from modal to modeless in code and IDE
Changing a window's type from modal to modeless in code and IDE
Iniciado por guest, 28,jun. 2016 01:04 - 7 respuestas
Publicado el 28,junio 2016 - 01:04
Hi,

How do I change a window's type from modal to non-modal (modeless) and vice-versa? How do I do this in wlang and the IDE. Is there a property setting that can be changed in code?

I'd like to pass a parameter such as IsModal=true to the Open() function and let the form (window) set it's modal type property to true, or false if ISModal=false.

Thanks,
Stanley
Publicado el 28,junio 2016 - 01:29
Hello Stanley

Would OpenChild() or OpenSister achieve what you need for the window ?
They could be used as conditional opening statements in your code.

As far as the IDE is concerned there is an option is the details tab to set a window as Free, MDI or MDI Child

Regards
Al
Publicado el 28,junio 2016 - 05:45
Hi Al,

Quote
Al

Would OpenChild() or OpenSister

I do not know as this is really not a Child or Sister window. It is simply a window that I'd like to open more than once and not stop all other windows from opening and closing.


Quote
Al

As far as the IDE is concerned there is an option is the details tab to set a window as Free, MDI or MDI Child

I saw that, but mine is set to free and when run it is acting as if it is modal. I'm calling it from a menu window with a simple Open(WIN_Calculations) and as long as the WIN_Calculations window is open, all other menu items on the menu window cannot be run. It beeps when clicking anything on the menu window. If I close the WIN_Calculations window, then the menu window and menu items are clickable.

Another related question...
If I created a Child window and later decided that it should be a free or Sister or mdi or an internal window, is there a property that would immediately change it, or do I have to completely create a new window of the type desired? (I hope its a property setting)

I'm actually working thru the Tutorial_WinDev.pdf page 54 when running into this question...

Thanks, Stanley
Publicado el 28,junio 2016 - 11:01
Stanley,

Not sure if you've delved into the online help, but maybe this could help:

http://help.windev.com/en-US/…
...and the corresponding modal help:
http://help.windev.com/en-US/…
Publicado el 28,junio 2016 - 14:32
Hi Stanley,

there is no such thing as a MODAL window in the editor stage...

Modal or NON modal is decided by the function you use to open it:
- Open = MODAL
- OpenChild or OpenSister = NON modal

that's all

So all you need to do is either use Open or OpenChild and you'll get what you described

Best regards
Publicado el 28,junio 2016 - 17:22
Hi Darren and Fabrice,

Quote
Darren

Not sure if you've delved into the online help
Yes I did after sending my last reply where Al mentioned Sister and Child windows which I was intentionally overlooking because my window is a free window and not part of any mdi setup.

After playing with it a bit, Fabrice is spot on... it works as expected with child, even though I would not consider it as a child window in the sense that it's part of a mdi setup.

So does this free, and mdi windows stuff mean anything unique or is for terminology? I ask, because in my case where I have a window defined as "free" and I am changing its modality behavior based on the command that calls it.

Thanks, Stanley
Publicado el 28,junio 2016 - 20:05
Hi Stanley,

you are mixing things that are completely different.

MDI is an OLD M$ technology allowing to open windows INSIDE a mother window...
Even M$ has abandoned that technique, but the option is still in Windev because some of us were and are still using it.

Now, for everybody NOT doing MDI, we are using FREE windows (ie they do not open INSIDE another one)...
And these free windows are EITHER modal or not depending on HOW we open them

Best regards
Publicado el 28,junio 2016 - 20:28
Thanks Fabrice!

I get it now, thanks for your explaination...

Stanley