cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding attachment of Image

Former Member
0 Kudos

Sir

I want to attach a image into a button in the view.

Plz send me the procedure.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try doing this,

Paste an image button.gif in src->mimes->components->your component package

Create a context attribute IconURL and set the property of <b>imageSource</b> to this attribute.

in onInit() method add this code

wdContext.currentExcelElement().setIconURL(

WDURLGenerator.getWebResourceURL(wdComponentAPI.getDeployableObjectPart(), "button.gif"));

Former Member
0 Kudos

Thanks Bhat.

I have solved my problem by using ur guidelines.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

specify the <b>imageSource</b> property of the button to the name of the image file.

You can access images from

1) src\mimes\Components\<package name> in your project folder structure.

2) SapIcons

Ex: ~sapicons/s_b_abca.gif

Regards

Ayyapparaj

Former Member
0 Kudos

hi,

For this you can set the imageSource property of the button to the name of the image file like "lookup.gif". Place the image in src\mimes\Components\<package name> in your project folder structure.

thanks & regards,

Manoj

Former Member
0 Kudos

Dear Manoj

I have placed the image under src/........

and as part of button property :ImageSource:I have written name(sample.gif).

But it is not displayed

Former Member
0 Kudos

Hi,

Try a different image with a smaller size. But it should not be a problem.

Manoj