GUI popup window menu

Blitz3D Forums/Blitz3D Beginners Area/GUI popup window menu

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You know in some applications u click example settings theres a popup menu, with Ok, Cancel but my question is,
this popup locks the main window u cant access the main window until u pressed(closed) ok or cancel on the setting menu, I need to do that and how do you put only a (X)"close icon" on the top bar thing....?

I really need this, and simple example would really help
Thanks in advance~

they're called modal windows, I don't know anything about B+, but take a look under commands for creating windows and see if there is an option to set it to modal.

Have a look at the Proceed/Notify/Confirm commands. They open these types of requester windows and block the main window. You can create a window with just the 'X' by giving the window a tilebar and making it a 'tool' window.
Use style flags 1+16 as in the example here:

win=CreateWindow("Hello",150,150,200,150,0,16+1)
result=Proceed("choose ..")
WaitEvent
End

Notice out the "Hello" window is blocked whilst the requester window is open.

Thanks gonna try this right away

No good It just pops up 2 thing the tool window and the yes no cancel window and u cant click on the tool window... until u click yes, no cancel ...
Not working..

while WaitEvent()
...
			Select EventData()
				
				Case 1
				winproj=CreateWindow("Hello",150,150,200,150,0,16+1)
				result=Proceed("choose ..")
...
Wend


Is this the sort of thing you want to do or are you trying to create a custom popup window?

win=CreateWindow("Hello",150,150,170,80,0,1)
button=CreateButton("Click me",20,20,100,18,win)

quit=False

Repeat
	ev=WaitEvent()
	Select ev
	Case $401 ; gadget
		If EventSource()=button result=Proceed("choose ..")
	Case $803 ; close window
		quit=True
	End Select
Until quit=True

End


Custom, but I think I figured it out,

a simple
win1 = CreateWindow("Hello",150,150,170,80,0,1)
win2 = CreateWindow("Hello2",150,150,170,80,win1,1)
seems to work o.o;

I was able to achive what i wanted from the begining its awesome if anyone wana see it reply to this post I'll make a source code that you can look at it :)