You really want a non-transparent background for gadgets on Canvas?
Or are you looking for a way to have transparent gadgets on a window?
For the canvas you simply need to draw a box before you place your gadget.
Code:
If OpenWindow(0, 0, 0, 600, 600, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(0,RGB(80,255,255))
;CheckBoxGadget(1,30,30,100,30,"chk")
OptionGadget(1,30,30,100,30,"Opt")
CanvasGadget(0, 200, 200, 200, 200,#PB_Canvas_Container|#PB_Canvas_Border)
If StartDrawing(CanvasOutput(0))
Box(0,0,200,200,RGB(80,255,255))
Box(30,30,100,30,$FFFFFF) ; <-- you would need to get the default window color somehow, if that's what you want.
StopDrawing()
EndIf
;CheckBoxGadget(2,30,30,100,30,"chk")
OptionGadget(2,30,30,100,30,"Opt")
CloseGadgetList()
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf