Je suis nouveau et j'ai qq difficulté.
mon problème est le suivant
J'ai une image dans une scrollarea.
Quand j'appuie sur les scrollbar, l'image ne suit pas le défillement.
Voici mon code:
Si qq peut m'aider.
merci
Code : Tout sélectionner
; Enable all the decoders than PureBasic actually supports
;
UseJPEGImageDecoder()
; Enable all the encoders than PureBasic actually supports
;
UseJPEGImageEncoder()
If
OpenWindow(0,0,0,305,140,#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget,"ImageGadget")
And CreateGadgetList(WindowID(0))
If LoadImage(0, "photo.jpg") ; change 2nd parameter to the
path/filename of your image
ScrollAreaGadget(0, 10, 10,290,120, 375, 155, 30)
ImageGadget(0, 10,10,100,83,UseImage(0)) ;
imagegadget standard
ImageGadget(1,130,10,100,83,UseImage(0),#PB_Image_Border) ;
imagegadget with border
CloseGadgetList()
EndIf
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf