ContainerGadget
Publié : mar. 08/janv./2019 20:32
Bonsoir à tous
Je ne comprends pas pourquoi le containerGadget ne s'affiche pas comme prévu. Ci-dessous, la partie du code simplifié pour vous faciliter la lecture.
Merci de m'éclairer
Je ne comprends pas pourquoi le containerGadget ne s'affiche pas comme prévu. Ci-dessous, la partie du code simplifié pour vous faciliter la lecture.
Merci de m'éclairer
Code : Tout sélectionner
Enumeration
#WinMenu
#Conteneur
#bouletable
#linktable
#boulestock
#linkstock
#boulefb
#linkfb
#boulebc
#linkbc
#bouletres
#linktres
#bouleJl
#linkJl
#bouletool
#linktool
#bouleexit
#linkexit
EndEnumeration
UseJPEGImageDecoder()
;C'est une petite boule qui apparait à gauche du texte de chaque lien du menu....
catchImage(10, ?imgboule)
DataSection
imgboule:
IncludeBinary "images/boule.jpg"
EndDataSection
ExitMenu=0
ExamineDesktops()
Wlargeur=DesktopWidth(0)
Whauteur=DesktopHeight(0)
OpenWindow(#WinMenu, 0,0, Wlargeur, Whauteur, "test conteneur",#PB_Window_SystemMenu |#PB_Window_ScreenCentered | #PB_Window_TitleBar |#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget)
SetWindowColor(#WinMenu,RGB(255, 255, 255))
If CreateMenu(0, WindowID(#WinMenu))
MenuItem( 01, "rien")
MenuItem( 99, "Fin de session")
EndIf
wcol=20 : wtop=100
ContainerGadget(#Conteneur, 10,wtop,200,500, #PB_Container_Flat)
SetGadgetColor(#Conteneur,#PB_Gadget_BackColor,RGB(2, 2,2))
wtop=wtop+20
ImageGadget(#BouleTable,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#LinkTable,wcol+30, wtop,130,40,"Tables", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#LinkTable,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#LinkTable,FontID(21))
wtop=wtop+40
ImageGadget(#Boulestock,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#Linkstock,wcol+30, wtop,130,40,"Stock", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#Linkstock,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#Linkstock,FontID(21))
wtop=wtop+40
ImageGadget(#Boulefb,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#Linkfb,wcol+30, wtop,130,40,"Fiches brigades", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#Linkfb,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#Linkfb,FontID(21))
wtop=wtop+40
ImageGadget(#Boulebc,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#Linkbc,wcol+30, wtop,130,40,"Bons de commande", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#Linkbc,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#Linkbc,FontID(21))
wtop=wtop+40
ImageGadget(#Bouletres,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#Linktres,wcol+30, wtop,130,40,"Trésorerie", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#Linktres,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#Linktres,FontID(21))
wtop=wtop+40
ImageGadget(#BouleJl,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#LinkJl,wcol+30, wtop,130,40,"Journaux", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#LinkJl,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#LinkJl,FontID(21))
wtop=wtop+40
ImageGadget(#Bouletool,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#Linktool,wcol+30, wtop,130,40,"Utilitaires", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#Linktool,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#Linktool,FontID(21))
wtop=wtop+40
ImageGadget(#BouleExit,wcol,wtop,0,0,ImageID(10))
HyperLinkGadget(#LinkExit,wcol+30, wtop,130,40,"Sortie", RGB(255,255,255), #PB_Font_Underline)
SetGadgetColor(#LinkExit,#PB_Gadget_FrontColor,RGB(240, 169, 111))
SetGadgetFont(#LinkExit,FontID(21))
CloseGadgetList()
ExitMenu=0
Repeat
EventId=WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
CloseWindow(#WinMenu)
ExitMenu=1
EndIf
Until ExitMenu=1
End