Container color strange behavior [Resolved]
Posted: Wed Dec 24, 2025 9:16 pm
Hello at all
At your advice, why the Panel 2 and 3 not show the same colors
Yet the PbId is never the same
Have a good day
At your advice, why the Panel 2 and 3 not show the same colors
Yet the PbId is never the same
Code: Select all
OpenWindow(0,0,0,800,600,"Panels",#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
For i = 1 To 4
PanelGadget(i, Offset, 0, 200, WindowHeight(0))
AddGadgetItem(i, -1, "Onglet 1")
Id = ContainerGadget(#PB_Any,Offset,0,300,WindowHeight(0))
Debug id
CloseGadgetList()
SetGadgetColor(Id, #PB_Gadget_BackColor, #Black)
AddGadgetItem(i, -1, "Onglet 2")
id = ContainerGadget(#PB_Any,Offset,0,300,WindowHeight(0))
Debug id
CloseGadgetList()
SetGadgetColor(Id, #PB_Gadget_BackColor, #Red)
AddGadgetItem(i, -1, "Onglet 3")
id = ContainerGadget(#PB_Any,Offset,0,300,WindowHeight(0))
Debug id
CloseGadgetList()
SetGadgetColor(Id, #PB_Gadget_BackColor, #Yellow)
CloseGadgetList()
Offset + 200
Next
Repeat
Evenement = WaitWindowEvent()
EvenementGadget = EventGadget()
EvenementType = EventType()
Until Evenement = #PB_Event_CloseWindow
of the world 