1. Joshua Woon
  2. PowerBuilder
  3. Friday, 23 February 2018

I've a N-up datawindow that I would like to place a picture control. How can I control that display of the picture control so that it only appears for those row/column that has data element?

How do I modify the PictureName property of the picture control? I want to dynamically assign the PictureName (or read it from the database).

Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Joshua;

  If you are on a newer version of PB - like 12.6 or 2017 - I would suggest using the INK control instead of the picture control for more control over the image display. Also, I would suggest that you use the new TableBLOB DataWindow feature. The TB allows you to have the DW object handle the SelectBlob directly vs you coding it. TB controls can be set to behave like Ink Picture, RTE or an XPS document against the binary datastream - for example:

1) Add the TB column

2) Then select its use ...

 

HTH

Regards ... Chris

Comment
There are no comments made yet.
  1. Friday, 23 February 2018
  2. PowerBuilder
  3. # 1
Marco Meoni Accepted Answer Pending Moderation
0
Votes
Undo

Hello Joshua,

instead of a picture object, I would simply add a computed field containing the following expression

Bitmap('myfolder\' + String( pictureID ) + '.jpg')

That will display any jpeg according, for example, to the pictureID column that you have on the row.

Now, making it (in)visible is easy, just add a boolean condition to the Visible property of the computed field.

HTH.

Cheers,

Marco

Comment
There are no comments made yet.
  1. Friday, 23 February 2018
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


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