10381 : image on a TimeItem

Question

I want to know how to tile an image on a TimeItem.
I wrote this:< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

item.TimeItemLayout.ImageIndex    =  m_ClipItemIndex;
item.TimeItemLayout.TimeItemStyle =  TimeItemStyle.Image;

Now I see the image yet it is not tiled to the whole duration of the TimeItem.
(I.e the image is not Tiled to the whole duration of the TimeItem, It is shown in it original size and the rest of the TimeItem is not shown)

How can I do this?

Answer

Actually the ImageIndex set in a TimeItemLayout will only be in effect when the time item style is Image.
A better way to add the images to a time item is to use the ImageIndex of the TimeItemTextLayout.
You can add time item texts to your time items and set the text=”” but the ImageIndex to a valid index of the Gantts imageList.
You can use the padding functionality of the timeItemTextLayout to place the image where you want it.
You can add as many timeItemTexts as you need.
 
However this feature was not fully implemented in the 2.0.13.0. You may request a pre release of 2.1 called 2.0.19.0 that has this feature fully implemented from support.

Leave a Reply