1. Tom Peters
  2. Beta Testing
  3. Wednesday, 23 October 2024 13:13 PM UTC

Good Day!

I am testing 25.0.0.3398. I am using the DisplayMenuAsRibbonBar and, overall, things are working. I did notice, however, that if I assign the menu item's ButtonImage to a custom image without the full path specified, the image does not appear when running my application via the IDE. 

Overview:

We have numerous custom image files we use for menus. The folder holding these are in my Windows PATH variable, so the IDE can always find them while running. In PB22 R3 and earlier, all of these images appear as expected when running via the IDE. In PB2025, however, they do not. In fact, when I use the IDE to assign the image, if I remove the full folder path in the ButtonImage property while still in the Select Image screen, I get 'Please specify a valid image'. So, I leave the full path and then back in the menu painter I remove the path and save just the image name. The image does not appear in my application while running via the IDE. 

Understandably, we cannot use the full folder path for these images, otherwise different developers could trip AND the deployment will fail.

I am sure I missed something. Any assistance would be appreciated.

Thanks,

Tom

David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2024 15:02 PM UTC
  2. Beta Testing
  3. # 1

It might be an idea to raise a support ticket, that will allow development to investigate.

Comment
  1. Tom Peters
  2. Wednesday, 23 October 2024 15:04 PM UTC
Will do!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2024 20:13 PM UTC
  2. Beta Testing
  3. # 2

Hi Tom;
  FWIW: Here is what I have been doing in my STD Framework for over two decades now to handle not only menu images but any control that houses an external image.  ;-)
For example, a menu item using an external image ...
IDE
The Menu image & it's toolbar image are assigned as follows:  ".\Images\blue_button.ico"  // aka relative path address in the IDE.
Thus, all images reside in the "Images" sub-folder So now running the PB App from the IDE everything works 100% image rendering wise.
EXE
  I now compile the Image PBL using a PBR into a PBD that now includes all App images used.
  Then I add the following to a suitable event. For the menu items, I use the parent menu item's "Selected" event, as follows ...

IF  go_ac.of_is_pb_ide_active( ) = FALSE  THEN	// Running as EXE?
    THIS.mi_blue.menuimage 	= fn_remove_path_name(THIS.mi_blue.menuimage)	// YES=>Remove path
    THIS.mi_dark.menuimage 	= fn_remove_path_name(THIS.mi_dark.menuimage)
    THIS.mi_grey.menuimage 	= fn_remove_path_name(THIS.mi_grey.menuimage)
    THIS.mi_lime.menuimage      = fn_remove_path_name(THIS.mi_lime.menuimage)
    THIS.mi_orange.menuimage    = fn_remove_path_name(THIS.mi_orange.menuimage)
    THIS.mi_silver.menuimage    = fn_remove_path_name(THIS.mi_silver.menuimage)
    THIS.mi_none.menuimage 	= fn_remove_path_name(THIS.mi_none.menuimage)
END IF

Result

   So with the above code, the App EXE images have *no* path and thus the PB Loader uses the PBD (or DLL for M-Code compiled app) to resolve the images.  This has worked great for me for the past two decades & runs 100% as well in both PC and PS deployed Apps.   :-)
My testing with the PB 2025 RB feature thus far also supports the above design approach with 100% effectiveness.  Food for thought.  HTH
Regards .. Chris

Comment
  1. Tom Peters
  2. Thursday, 24 October 2024 13:46 PM UTC
Hey Chris - Thanks for this. It seems that the ButtonImage property will not even let me specify the relative path. I get "Please specify a valid image". I like the approach you suggested. Maybe I misunderstood how to apply the ".\Images\myimage.bmp" to RibbonBar ButtonImage?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 24 October 2024 15:44 PM UTC
FYI: I am just entering it into the Menu Painter and then letting the automatic ribbon bar feature of PB 2025's menu to RB feature handle this at runtime to render the RB within the PB App. (as you can see above).
  1. Helpful 1
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.