then you can add this to it, and remove the need to type CreateGadgetList()
whenever you open a window. Plus, the new window has the added benefit
of having whatever default flags you like (eg. I like mine centered and with a
minimize button). Maybe this is useful for someone.

Code: Select all
Procedure MakeWindow(num,x,y,w,h,title$,flags=#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
ProcedureReturn CreateGadgetList(OpenWindow(num,x,y,w,h,title$,flags))
EndProcedure
If MakeWindow(1,0,0,250,80,"Window title") ; No flags = centered + minimize button.
TextGadget(1,20,30,200,20,"Example of embedded CreateGadgetList()")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf