Skip to Content
avatar image
Former Member

Regarding attachment of Image

Sir

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

Plz send me the procedure.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 13, 2007 at 05:42 AM

    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"));

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 13, 2007 at 05:38 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 13, 2007 at 05:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded