Windows / GUI Functionality in Blitz+

Blitz3D Forums/Blitz3D Beginners Area/Windows / GUI Functionality in Blitz+

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.

I don't, but it's fairly straightforward after looking at some examples. I would start out with a nice event-based barebones:
wndMain=CreateWindow("",200,200,200,200)
Repeat
	Select WaitEvent()
		Case $803 : End
	End Select
Forever

You can put in all the events you want to watch for in the Select WaitEvent() structure, including GadgetAction events (for when you have multiple gadgets, you can put a Select EventSource() in that event's case to figure out what gadget was used) and Timer events if you want to do something every 60th of a second, for example, render a game. Just say CreateTimer(60) upon initialization.

As for what you're asking for...
Create a window: Use the CreateWindow command, that's really all there is to it.

Update a window: All the normal window operations update normally. You can use other Window commands AND some gadget commands on windows to hide them, disable them, resize them programmatically, etc.

Create Gadgets: It's as simple as using any of the "Create..." functions listed under their respective gadgets (in the docs). Just set the parent to be the window handle (wndMain in this case).

Assign to group: When you create the gadgets, instead of assigning the parent to be wndMain, first create a panel (CreatePanel) whose parent is wndMain, then create the gadgets that you want to be grouped and assign their parent to be the panel.

Release gadgets: It's as simple as calling Freegadget, which will remove the gadget and any of its children. It works with windows too.

Take a look at the samples, and ask any questions you might have.