ich wollte auf einer Programmoberfläche eine Weboberfläche imitieren, bei der ein breites Bild über den Bildrand hinausragt.
Nutze ich nun:
Code: Alles auswählen
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
Enumeration
#bild2 ; Breite 1800 Pixel
EndEnumeration
Procedure Open_Window_0()
If OpenWindow(#Window_0, 0, 0, 1024, 600, "", #PB_Window_SystemMenu | #PB_Window_TitleBar)
If CreateGadgetList(WindowID(0))
UseJPEGImageDecoder()
DataSection
bildadr02: IncludeBinary "bild2.jpg"
EndDataSection
bildid02 = CatchImage(1, ?bildadr02)
ImageGadget(#bild2, 140, 0, 1800, 450, 0)
SetGadgetState(#bild2, bildid02) ; change the picture in the gadget
EndIf
EndIf
EndProcedure
Open_Window_0()
Programmschleifenstart:
Repeat
Event = WaitWindowEvent()
WindowID = EventWindow()
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
If Event = #PB_Event_Menu
If EventMenu()=1
; Gosub
EndIf
If Event = #PB_Event_Gadget
GadgetID = EventGadget()
If GadgetID = #bild02
; gosub
EndIf
EndIf
Until WindowID=#Window_0 And event= #PB_Event_CloseWindow
Ergebnis=MessageRequester("Programm beenden", "Programm schliessen?", #PB_MessageRequester_YesNoCancel)
If Ergebnis=7 Or Ergebnis=2
Goto Programmschleifenstart
EndIf
End
Frdl. Gruss
Hiltwin