1. kevin kevin rowe
  2. PowerBuilder
  3. Wednesday, 25 May 2022 11:07 AM UTC

I have a picture control in a user defined object that will be set by a function call 

If I pass a disk file name, the function works. If I pass a built-in file name like the one that it displays correctly if unchanged ("Prior1!") like "CustomerBig!" then it displays nothing. I can't find any reference to the picturename not working if you pass a built-in definition. The ribbonbar that the icon picturename is taken from works fine with either disk file names or built-in names.

Is this only going to work for disk files?

type p_icon from picture within uuo_favbut2
event ue_lbuttondown pbm_lbuttondown
event ue_lbuttonup pbm_lbuttonup
integer x = 105
integer y = 32
integer width = 146
integer height = 128
string picturename = "Prior1!"
boolean border = true
end type

public subroutine of_showicon (string asfilename);
isIconImage = asfilename
p_icon.picturename = asfilename

ibShowIcon = true

p_icon.x = (this.width - 146 ) / 2

st_legend.textsize = iiIconTextSize
st_legend.x = 32
st_legend.y = 160
st_legend.width = this.width - 64
st_legend.height = this.height - 192
st_legend.textsize = iiTextSize

end subroutine

 

 

Accepted Answer
kevin kevin rowe Accepted Answer Pending Moderation
  1. Wednesday, 25 May 2022 12:36 PM UTC
  2. PowerBuilder
  3. # Permalink

It looks like the problem is that the built-in icon names I'm using are specific to the ribbonbar.

"CustomerBig!" does not work, but "DBAdmin!" does.

 

Is it possible to reference these icons using a reference library?

 

Comment
  1. Roland Smith
  2. Wednesday, 25 May 2022 14:24 PM UTC
If you have the image as a file, you can add it to the .PBR file when compiling the app.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 25 May 2022 13:15 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Kevin -

In mid-December 2020, Julie Jiang supplied Zip files containing the extracted small and large RibbonBar icons in both bmp and png formats (which was VERY nice of her to do for the Community). Here is the link to the Q&A thread where she posted them:

https://community.appeon.com/index.php/qna/q-a/how-to-leverage-new-icon-images-in-dw-example-emailbig

If you're unable to display the desired image with your current technique, you should be able to utilize the image in its stand-alone PNG/BMP file.

HTH

Regards, John

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 25 May 2022 11:24 AM UTC
  2. PowerBuilder
  3. # 2

I repeated the test with a function and it also works fine.

// Function
public subroutine of_seticon (string as_pn);pb_1.picturename = as_pn

return
end subroutine

// Function call
string ls_pn = "prior1!"

of_seticon(ls_pn)

What version of PB are you using?

Also, what does ibShowIcon variable do? Where it is used?

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 25 May 2022 11:18 AM UTC
  2. PowerBuilder
  3. # 3

Hi.

I test the following code:

string ls_pn = "prior1!"

pb_tmpbutton.picturename = ls_pn

This code works fine for me. I do see the new icon.

Andreas.

Comment
  1. Andreas Mykonios
  2. Thursday, 26 May 2022 09:12 AM UTC
Don't know which icon you look for, but two icons are available only as 32x32 png. Those are ReturnBig.png and ContinueBig.png...

Andreas.
  1. Helpful
  1. kevin kevin rowe
  2. Thursday, 26 May 2022 09:33 AM UTC
Andreas,

I'm looking for the resource that is mapped in the ribbonbar as ProductReportBig!.

This is not in pbresource.dll nor pbribbonbar.dll. The zip file of 32 or 16 bit images does not include it either.
  1. Helpful
  1. kevin kevin rowe
  2. Tuesday, 7 June 2022 09:47 AM UTC
In the end I simply created my own image files from those supplied (thanks, John Fauss) and some roll-your-own images.

It would have been a whole lot simpler if PB had honored the built-in names from the ribbon builder, but heigh ho.
  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.