Page 1 of 1

Make it easier for users: example in ImageGadget()

Posted: Sat Apr 13, 2024 12:51 pm
by infratec
The example in the help for ImgageGadget ist not runable out of the box.
That's not nice.

This would be better:

Code: Select all

If OpenWindow(0, 0, 0, 286, 148, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  If LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp")
    ImageGadget(0,  10, 10, 0, 0, ImageID(0))                      ; imagegadget standard
    ImageGadget(1, 148, 10, 0, 0, ImageID(0), #PB_Image_Border)    ; imagegadget with border
  EndIf
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Re: Make it easier for users: example in ImageGadget()

Posted: Fri Apr 19, 2024 8:31 pm
by Andre
Thanks for your suggestion. I used the new code with the complete path, so it's directly runable now.... :)

But I used the original 'Map.bmp' file (with which also the screenshot in the help was made), which I added to the PB docs from my code/gfx collection now...