Modal Child Window HELP !

BlitzPlus Forums/BlitzPlus Programming/Modal Child Window HELP !

Apollonius(Posted 2003) [#1]
I really need to find a way to do this, I've tryed but my lack of skills with Blitz+ didn't get me anywhere maybe someone like YOU! That has experience might give me the perfect simple to use solution that I'm looking for!

Modal Child Window, is a popup window that stays ontop of you application's main window without never getting behind it.
What I want to do is get one of thoses window on my application for settings, and I want my main window to be "locked" while the Modal Child Window of the setting is ontop, you would need to either click Ok or Cancel on the modal window to get back to the main window.

Hopefully I explaned this very clearly, as my native language isn't english but I think I did pretty good :P

The only thing I need is a way to make the Modal Window, don't know how to lock my main window but I'll find a way else if I don't you'll hear from me again :P

This is something I really need and any help would be greatly appreciated, I wish BlitzPlus would have some commands for that kind of situation many applications uses thoses. :)


Perturbatio(Posted 2003) [#2]
You could disable the parent window with that DisableGadget command then display your "modal" window, then when it is closed, re-enable your parent window.


cbmeeks(Posted 2003) [#3]
If all you want is a "OK or Cancel" window that "locks" all other windows then use the notify command.

Also, there is the confirm and proceed commands.

cb


Apollonius(Posted 2003) [#4]
>.>
I need to put a ton of gadget in the window so I need a window... preceed and confirm ive tryed its not the solution ....

I want the real solution..


cbmeeks(Posted 2003) [#5]
have you tried putting all of the gadgets in your main window in a panel and de-activating the panel? It should de-activate all child gadgets.

cb


Apollonius(Posted 2003) [#6]
I could do that but the most important part is the Modal Window, I kind of can figure out how to disable my whole main application but the modal window is a mistery I even e-mailed Mark.


Mr Brine(Posted 2003) [#7]
Yo Dude,

I dunno if this is what yer mean, but take a scander at this

;---------------------------------------------------------

t = CreateWindow("Parent",100,100,200,200,Desktop(),3)
t2 = CreateWindow("Child",150,150,100,100,t,3)


Repeat

WaitEvent()

Select EventID()

Case $803

FreeGadget t
Exit

End Select

ActivateWindow t2

Forever

; ----------------------------------------------------------

Hope this helps you out

Mr Brine


Apollonius(Posted 2003) [#8]
This is approx. what I wana, thanks alot it could do,

is it possible to like the main window T to be selected but T2 to be still infront of it?


Mr Brine(Posted 2003) [#9]
I dont fink so


Binary_Moon(Posted 2003) [#10]
is it possible to like the main window T to be selected but T2 to be still infront of it?


Make it a tool window (flag 16)


Apollonius(Posted 2003) [#11]
Aint it flag 17 O.o;
Anyway I was able to do it :)
Simple actually, just set the parent of the window to ur main window and voila