1. Miller Rhodes
  2. PowerBuilder
  3. Thursday, 23 June 2022 01:07 AM UTC

I am currently trying to implement a Ribbonbar in Powerbuilder 2019 R2 build 2353.

When I am previewing my Ribbonbar in the Ribbonbar builder all of the icons show up. I am using .ICO files.

When I try to implement the Ribbonbar at runtime then only the 'shipped' graphics show up - the ones that end in "!"

I have tried using PNG files and still have the same problem. In one case the PNG shows up but then disappears when I 

move my mouse over that menu option or click on it.

Has anyone encountered this ?

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 23 June 2022 14:43 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Miller;

  If the external images are shipped with the App EXE iand reside n the same folder, then they should render. However, that "assumes" that the PB App does not change the current folder. Note that commands like: SetCurrentDirectory, GetFileOpenName, Run, etc can change the App EXE's current working folder and thus, your external images will now not be found. Food for thought.

Regards... Chris

Comment
  1. Miller Rhodes
  2. Wednesday, 21 September 2022 19:05 PM UTC
Chris caught it. The application was changing the default directory for Powerbuilder in the start-up process. I had to change it to do this only in the situations where required. It was totally unnecessary to change that directory at that time since it was only required in a specific situation.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 21 September 2022 19:40 PM UTC
Hi Miller .. I am super glad that you found the issue ... awesome! :-)
  1. Helpful
There are no comments made yet.
Miller Rhodes Accepted Answer Pending Moderation
  1. Thursday, 23 June 2022 01:42 AM UTC
  2. PowerBuilder
  3. # 1

Yes. My icons reside in the same folder as all of my powerbuilder code ( pbls, workspace, target, etc..)

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 23 June 2022 01:22 AM UTC
  2. PowerBuilder
  3. # 2

Are the non-stock icons accessible to the app when it is executing? For example, if running the app from the IDE, do the icon files reside in the same folder as the target? If running from a compiled executable, did you create and include a resource (.pbr) file that lists every non-stock icon? I've not used the Ribbonbar, but it sounds from your description as if the app cannot find/access these non-stock icon files.

I might be wrong, but as I understand the implementation of PB's Ribbonbar, the Ribbonbar Builder creates an XML file that defines the Ribbonbar's layout and operation. There is no "internal reference" to any graphical resource residing within a PB object like there is for say, a menu or treeview, so you must ensure these graphical resources are accessible by the app at runtime.

Comment
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.