- Les scrollbar ne doivent pas s'afficher : Résolu
- L'image doit occuper 100% de l'espace du webgadget : Mon souci est là
Le code HTML que j'utilise
Code : Tout sélectionner
"<body scroll = 'no' ><img src='" + url + "/data/avatars/" + Profil + "' width='100%' height='100%'></body>"
Code : Tout sélectionner
Global url.s = "http://s242132022.onlinehome.fr/game01/"
;Plan de l'application
Declare Start()
Declare.s ShowThumbNail(Profil.s = "")
Declare Exit()
Start()
Procedure Start()
OpenWindow(0, 0, 0, 800, 600, "Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
SetWindowColor(0, RGB(105, 105, 105))
WebGadget(1, 5, 5, 100, 100, "")
SetGadgetItemText(1, #PB_Web_HtmlCode , ShowThumbNail("p001.png"))
;Triggers
BindEvent(#PB_Event_CloseWindow, @Exit())
Repeat : WaitWindowEvent() : ForEver
EndProcedure
Procedure.s ShowThumbNail(Profil.s = "")
Protected Buffer.s
If Profil = ""
Profil = "profil.jpg"
EndIf
Buffer = "<body scroll = 'no' ><img src='" + url + "/data/avatars/" + Profil + "' width='100%' height='100%'></body>"
ProcedureReturn Buffer
EndProcedure
Procedure Exit()
End
EndProcedure
Taille de l'image 120 x 120
Je ne souhaite pas utiliser une autre solution car dans mon code normal je peux télécharger plus de 100 images.
Merci d'avance pour votre aide.