Les opérations de dessin sur la fenêtre doivent supplanter le SetWindowColor() entrainant ce problème.
Un exemple de palliatif, plus lourd mais fonctionnel, en prenant les fonctions de base.
Code : Tout sélectionner
If *TINFO\nRegionIndex=1 And *TINFO\nDataIndex<>0
OpenWindow(1,(WindowMouseX(0)+WindowX(0))+5,(WindowMouseY(0)+WindowY(0))-15,150,50,"",#PB_Window_BorderLess)
SetWindowColor(1, RGB(58, 91, 197))
CreateGadgetList(WindowID(1))
TextGadget(0,0,0,WindowWidth(1),WindowHeight(1),j$+" "+date$ +Chr(13)+ Mesure$(*TINFO\nSeriesIndex)+" "+ StrD(*TINFO\nData1,2)+Unite$(*TINFO\nSeriesIndex))
SetGadgetColor(0,#PB_Gadget_FrontColor,RGB(238, 238, 17))
SetGadgetColor(0,#PB_Gadget_BackColor,RGB(58, 91, 197))
EndIf
If *TINFO\nRegionIndex=2 And *TINFO\nDataIndex<>0
OpenWindow(1,(WindowMouseX(0)+WindowX(0))+5,(WindowMouseY(0)+WindowY(0))-15,150,50,"",#PB_Window_BorderLess)
SetWindowColor(1, $FFFDF)
CreateGadgetList(WindowID(1))
TextGadget(0,0,0,WindowWidth(1),WindowHeight(1),j$+" "+date$ +Chr(13)+ "Pression"+" "+StrD(*TINFO\nData1,0)+" "+"hPa")
SetGadgetColor(0,#PB_Gadget_FrontColor,RGB(58, 91, 197))
SetGadgetColor(0,#PB_Gadget_BackColor,$FFFDF)
EndIf
@+