Make it easier for users: example in ImageGadget()

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Make it easier for users: example in ImageGadget()

Post 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
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

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

Post 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...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply