Ribbon images

 I'm trying to create ribbon from .net code. 

It works generally well, however, I have a problem with images. 
I create ribbon from code, and I have a folder with images.
When I create RibbonButton, I noticed 3 properties for Image:
Image, LargeImage and ImagePath.

I set to all of them full path of my desired png image, but I always receive this error: 14:22:56: XRC error: XRC resource "BMP_16_C:\PROGRAM FILES\STUDIO ARS\URBANO 9.1\EN\2015\RIBBONIMAGES\IDI_LABEL_AUTOPOS.PNG" (class "wxBitmap") not found. 

The path is correct, but there is BMP_16_ inserted at the beginning, and path is not valid anymore.

Any suggestions?

Thank you


Comments

  • Hello Damir,
    Before setting the property ImagePath, you need to set the property ExternalImage to true. That is because you are using external images and not bricscad resources.
    Please let me know if that helps you.
  •  Thank you very much! The problem was that I was setting property Image first, and then ExternalImage. When I swapped order of those, everything worked as expected.
This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!