1. Luis Pesaressi
  2. PowerBuilder
  3. Wednesday, 3 March 2021 08:16 AM UTC

HI

I have  datawindows with pictureobject in the header, how can assign the image setpicture(blob) from the selectblob

 

tableblob NOT work in header

largebinary NOT work in heather

 

somebody can help how can assign the image

 

thanks 

 

Luis

 

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 March 2021 18:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Luis;

  Neither the DataWindow Control or DataStore support the SetPicture() method.

  So for DWO pictures, you would have to use the "Display as Picture" property. This means that if you're storing the images in the DBMS as "blobs", then you would have to perform a SelectBlob command followed by a FileWrite() command to save the image to the App's image(s) working location. Then set the "Display as Picture" property ON and the value of the column / compute / etc to the name of the Image File you saved it as.

HTH

Regards ... Chris

Comment
  1. mike S
  2. Wednesday, 3 March 2021 19:55 PM UTC
you can also use bitmap() in a compute to display a picture

bitmap( 'filename' )

and its just like display as picture in that the file must be saved to disk.





  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 3 March 2021 21:35 PM UTC
Another good alternative Mike!

FWIW: The only issues that I came across using the Bitmap() method were: a) certain image types are *not* supported and b) the converted image can be a bit blurry (depending on the original image's size & type).
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.