Fred wrote:To do that, just open a window with the #PB_Window_Background flag,
Thanks Fred, this already works! Very nice!
Code: Select all
If OpenWindow(0,0,0,0,0,"",#PB_Window_Background)
SetWindowTitle(0,"Window example")
CreateImage(0,DesktopWidth(0),DesktopHeight(0),24,0)
If StartDrawing(ImageOutput(0))
For y = 0 To OutputHeight() Step 20
Box(0,y ,OutputWidth(),10,RGB($40,$40,$40))
Box(0,y+10,OutputWidth(),10,RGB($50,$50,$50))
Next
StopDrawing()
EndIf
ImageGadget(0,0,0,DesktopWidth(0),DesktopHeight(0),ImageID(0))
For i = 0 To 5
ButtonGadget(#PB_Any,20,20+i*25,100,20,"Button "+Str(i+1))
Next i
progress = ProgressBarGadget(#PB_Any,130,20,200,20,0,100)
SetGadgetState(progress,40)
OpenWindow(1,200,80,400,200,"Window",#PB_Window_Tool|#PB_Window_SizeGadget,WindowID(0))
EndIf
Problem: When the browser window size changes, the background window is not resized with it, yet.
Could this be added, and also an event for browser window size change? In this case I could also
re-generate the background image for the ImageGadget().
BTW: Shouldn't SpiderBasic constants be named #SB_XXXX? Using #PB_ is a bit weird for SB.
Maybe better to use #SB_ mainly and for compatibility to PB define the #PB_ constants additionally.