cancel
Showing results for 
Search instead for 
Did you mean: 

How to add an Image in the Tab strip of a Tab

Former Member
0 Kudos

Hi,

I am trying to add an image to the Tabstrip of a Tab UI element. I have declared a context variable of type string and also added the gif file into the \src\mimes\Components\ folder.

How can I assign the context variable to point to this Image? I am not sure how to go about binding the Image.Source property of the context. Will be of great help if someone can throw more light in this area.

Thanks for all your help in advance.

Best regards,

Divya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You want to set an image for the Tab header? The header is a Caption UI element which has a property "imageSource".

If your image is in the src/mimes/components/<component> folder, you can simply set the "imageSource" to the filename of the image e.g. "icon.gif". Data binding is not needed in this case, simply set the value in the property sheet of the view designer.

Armin

Former Member
0 Kudos

Hi Divya,

you could do for example in the wdDoInit() of the view

wdContext.currentContextElement().setPicture("picture.gif");

Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.

I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials. I have learned tremendously from them.

Hope this helped

Harald

Former Member
0 Kudos

Hi Herald,

Thanks a ton for your help!!

Shall look into the tutorails as well. I was setting the complete path in the setAttributeValue method which was the problem. Shall change it to what you have suggested.

Best regards,

Divya