Another maxgui question

BlitzMax Forums/BlitzMax Beginners Area/Another maxgui question

Galdy(Posted 2012) [#1]
I'd like to be able to switch between maxgui windows and my main program from which it is called. Trying to simulate this in the code below, the window created by MaxGui will not disappear when attempt close it. What am i doing wrong?



Import maxgui.Drivers

Graphics 1280, 1024


MyFirstWindow:TGadget = CreateWindow("My window", 200, 200, 320, 240)

Repeat
WaitEvent()
Until EventID()=EVENT_WINDOWCLOSE



Repeat

Until KeyHit(KEY_ESCAPE)
End


degac(Posted 2012) [#2]

Maybe I miunderstood your question.
If you start a second application you need to control the 'focus' and this is another thing extern to MaxGUI, I believe.

Cheers


Galdy(Posted 2012) [#3]
Sorry, I'm probably not explaining things well enough being a newb. I'd like to create a program as normal without maxgui, but from that program be able to create a maxgui window for whatever need. Then I'd like to be able to terminate all maxgui windows when done with them and return back to my main program loop. It's a dungeon editor program that i'd like to call up a window with maxgui now and then for variouse reasons. If that can be done. In the code i posted above,if i put an "end" to terminate the windows, it also ends the whole program. Not what I want.


Brucey(Posted 2012) [#4]
Why not try a graphics-based GUI if your needs aren't too complex. There are a few around. Some are free, some are not.

If not, you know you can use a Canvas to run your graphic-stuff inside, which is part of MaxGUI ? Then you can move around between your windows - even have your graphics-stuff running while you are doing things in another window, if you want.

Well, you have a few options :-)


Galdy(Posted 2012) [#5]
Graphics based gui uh? Didn't realize that you could use the max2d commands inside Maxgui window. That would be cool. Ok. Back to the Tuts for now.


col(Posted 2012) [#6]

Graphics based gui uh? Didn't realize that you could use the max2d commands inside Maxgui window. That would be cool. Ok. Back to the Tuts for now.



Take a look at CanvasGraphics. There was a question about it recently... 1 mo...
Here