Question
In some cases I need to display an image behind a timeitem, so I attached an imagelist to the grid. Since I’ve installed your new version (2.3), the grid displays images after each timeitem. Setting the imageindex to nothing doesn’t work. How can I disable this?
Answer
The new version allows for images on each TimeItemText. When you use a TimeItemText and you do not want/need an image you set the TimeItemTextLayout.ImageIndex=-1
TimeItemText tit=new TimeItemText();
string[] names={“First”,“Second”,“Third”,“Fourth”,“Fifth”};
tit.Text=names[random.Next(0,4)];
tit.TimeItemTextLayout=new TimeItemTextLayout();
tit.TimeItemTextLayout.Font=new Font(“Microsoft Sans Serif”,8,FontStyle.Bold);
tit.TimeItemTextLayout.Color=Color.Black;
tit.TimeItemTextLayout.HorzAlign=StringAlignment.Near;
tit.TimeItemTextLayout.VertAlign=StringAlignment.Center;
tit.TimeItemTextLayout.OutsideText=true; // The text will be put outside the time item
tit.TimeItemTextLayout.ImageIndex=random.Next(0,4);
//tit.TimeItemTextLayout.ImageIndex=-1;
ti.TimeItemTexts.Add(tit);