cancel
Showing results for 
Search instead for 
Did you mean: 

Image icon on the button UI element

Former Member
0 Kudos

Dear All,

I have a button as an UI element on the view. Now i need to put an image icon on this button. can anybody suggest how to achieve it?.

regds,

Anup.

Accepted Solutions (1)

Accepted Solutions (1)

florian_speth
Explorer
0 Kudos

Hi Anup,

it is possible to put an image on a button. You need to use the "imagesource" property. To use the common SAP-Icons, set the property to "sapicons/<iconname>". E.g. "sapicons/s_b_exec.gif". To determine particular names, have a look at this website: http://mysap.wdf.sap.corp:2080/resources/icon_cookbook/style.html

You can use your own images as well by setting the property to the path of the image.

Regards,

Florian

Former Member
0 Kudos

Correct. And for image-only buttons, I would suggest using the LinkToAction element.

Armin

Former Member
0 Kudos

I hope you can even place the image in the src/mimes/<component name> folder and give the name of the image file name in the button property.

Former Member
0 Kudos

Dear All,

Thanks for the reply

How can is set the ImageSource property?? jus by givig the path where image is saved..i tried but didn't work..

one more thing..what is the way to place the image in src/mimes..

Regds,

Anup.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can open "Package Explorer" window and you can navigate to src/mimes and you can copy the file there.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anup,

Follow these steps to import images to mime.

1. Open your application in package explorer.

2. Expend node src/mimes/components, under components

you will see directory for your application.

3. Now right click on your application directory and

choose <b>Import</b> from the context menu.

4. You will again come across a select menu chose

<b>File System</b>.

5. Now browse and put file's path to import.

6. Import all images you need in your application

following above steps.

Now you can use the image name to assign it to <b>imageSource</b> property of the button or .<b>source</b>

property of Image element.

Hope it helps.

Regards,

Narinder Hartala

Former Member
0 Kudos

Hi Anup.

It's not possible to modify the layout of a button control for on application. But instead of using a button you might use a image with a link.

regards,

Martin