Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 1 Jahr, 1 Monat
Letzter Beitrag:
vor 1 Jahr, 1 Monat
Beteiligte Autoren:
StanleyBarnett, Fabrice Harari, Al, DarrenF

Changing a window's type from modal to modeless in code and IDE

Startbeitrag von StanleyBarnett am 27.06.2016 23: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

Antworten:

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

von Al - am 27.06.2016 23:29
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

von StanleyBarnett - am 28.06.2016 03:45
Stanley,

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

http://help.windev.com/en-US/?1010022
...and the corresponding modal help:
http://help.windev.com/en-US/?1010028

von DarrenF - am 28.06.2016 09:01
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

von Fabrice Harari - am 28.06.2016 12:32
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

von StanleyBarnett - am 28.06.2016 15:22
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

von Fabrice Harari - am 28.06.2016 18:05
Thanks Fabrice!

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

Stanley

von StanleyBarnett - am 28.06.2016 18:28
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.