Event Close with Button?

BlitzMax Forums/MaxGUI Module/Event Close with Button?

Captain Wicker (crazy hillbilly)(Posted 2012) [#1]
I am trying to get the application to end when I click on the exit button in this code.
?MacOS
Import maxgui.cocoamaxgui
?Win32
Import maxgui.win32maxguiex
?Linux
Import maxgui.fltkmaxgui
?

Global window:tgadget=CreateWindow("Application",0,0,400,300,Null,window_default)
Global button:tgadget=CreateButton("Exit",200,150,50,25,window,button_push)


Repeat

WaitEvent()
Select EventID()
Case event_windowclose
End
Case button 'if i push the button, i want it to end the application
End
EndSelect


Forever

Can someone with a good deal of knowledge about these EVENT_ things tell me what I am doing wrong? Please?

I found the BlitzPlus GUI very simple, but yet still cannot get a grip of the maxgui. lol

Last edited 2012


Grisu(Posted 2012) [#2]


Grisu


shinkiro1(Posted 2012) [#3]


Take a look at the docs, they explain things very well, especially the examples included.


Captain Wicker (crazy hillbilly)(Posted 2012) [#4]
this is a tat more complicated than the gui in blitzplus isn't it?
Thanks for the examples!
Why doesn't the Linux gui look as good as the mac/windows gui?

Last edited 2012


SystemError51(Posted 2012) [#5]
Why doesn't the Linux gui look as good as the mac/windows gui?


I wondered the same thing. Seems like that MaxGUI has not been updated for Linux in a while, I think it is supposed to integrate with one of the GTK's.

For me however it looks as though it uses some other very basic, hard-coded drawing mechanism that only utilizes X11 core drawing functions. That would explain it all right


GaryV(Posted 2012) [#6]
The appearance on Linux is a major shortcoming for those wanting to use BM for Linux, IMHO.


rs22(Posted 2012) [#7]
MaxGUI on Linux uses FLTK - http://www.fltk.org/