Code : Tout sélectionner
Enumeration
#WIN_DOW
#FRAME_WIN1
#TEXT_1
#STRING_1
#PANEL
#FRAME_WIN2
#TEXT_2
#STRING_2
EndEnumeration
If OpenWindow(#WIN_DOW, 100, 100, 600, 400, "Color in frame", #PB_Window_SystemMenu)
WinWidth = WindowWidth(#WIN_DOW,#PB_Window_InnerCoordinate)
WinHeight = WindowHeight(#WIN_DOW,#PB_Window_InnerCoordinate)
FrameGadget(#FRAME_WIN1, 5, 5, 250, WinHeight-10, "GADGETS EN COULEUR" ,#PB_Frame_Container)
TextGadget(#TEXT_1,5,30,100,20,"Texte Gadget :")
SetGadgetColor(#TEXT_1, #PB_Gadget_BackColor, RGB(255, 255, 255))
SetGadgetColor(#TEXT_1, #PB_Gadget_FrontColor, RGB(210, 60, 66))
StringGadget(#STRING_1,5,60,100,20,"String Gadget",#PB_String_ReadOnly)
SetGadgetColor(#STRING_1, #PB_Gadget_BackColor, RGB(255, 255, 255))
SetGadgetColor(#STRING_1, #PB_Gadget_FrontColor, RGB(68, 201, 66))
CloseGadgetList()
PanelGadget(#PANEL,260, 5, WinWidth-265, WinHeight-10)
AddGadgetItem(#PANEL,0,"Panel Gadget")
PanelWidth = GetGadgetAttribute(#PANEL, #PB_Panel_ItemWidth)
PanelHeight = GetGadgetAttribute(#PANEL, #PB_Panel_ItemHeight)
FrameGadget(#FRAME_WIN2, 5, 5, PanelWidth-10, PanelHeight-10, "Joli frame" ,#PB_Frame_Container)
TextGadget(#TEXT_2,5,30,100,20,"Texte Gadget :")
SetGadgetColor(#TEXT_2, #PB_Gadget_BackColor, RGB(255, 255, 255))
SetGadgetColor(#TEXT_2, #PB_Gadget_FrontColor, RGB(210, 60, 66))
StringGadget(#STRING_2,5,60,100,20,"String Gadget",#PB_String_ReadOnly)
SetGadgetColor(#STRING_2, #PB_Gadget_BackColor, RGB(255, 255, 255))
SetGadgetColor(#STRING_2, #PB_Gadget_FrontColor, RGB(68, 201, 66))
CloseGadgetList()
CloseGadgetList()
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Select EventWindow()
Case #WIN_DOW
Quit = 1
EndSelect
EndSelect
Until Quit = 1
End
EndIf