Page 1 of 1

[Solved] Visual Designer - embedded images with CatchImage

Posted: Tue Sep 08, 2015 6:52 am
by Keya
The problem:
When you use PB's Visual Designer and for example create an Image gadget and specify "D:\projects\mydemo\image.bmp" it creates this code:

Code: Select all

LoadImage(#Img_Window_1_0,"D:\projects\mydemo\image.bmp")
Not very portable, and also in the case of program resources itd be nice to embed those

SIMPLE SOLUTION! - it would be great if there was simply an "Embed picture" checkbox option alongside gadgets that have images so that the generated code instead would be something like this:

Code: Select all

CatchImage(#Img_Window_1_0, ?ImageBegin, ?ImageEnd-?ImageBegin)
DataSection
  ImageBegin:
  IncludeBinary("D:\projects\mydemo\image.bmp")
  ImageEnd:
EndDataSection
Thankyou for considering :)

Re: Visual Designer - embedded images with CatchImage (easy!

Posted: Tue Sep 08, 2015 8:53 am
by mhs
This option already exists.

Look in the Form menu -> Picture Manager, there you can set a checkbox "CatchImage" and also an relative path to the picture.

Re: Visual Designer - embedded images with CatchImage (easy!

Posted: Tue Sep 08, 2015 2:41 pm
by Keya
GOOD IDEA WASNT IT! ;)
I've never even noticed the Picture Manager before! Thankyou for pointing it out - it's my new favorite IDE feature after Lock checkboxes for resizing :D