public void CreateUIForChoiceGroupCollection(ChoiceGroupCollection groupCollection)
{
foreach(ChoiceGroup group in groupCollection)
{
// make band
string label = group.Label;
label = label.Replace("_", "");
OutlookBarBand band;
if (group.HasSubGroups())
{
MakeTree(groupCollection, label, out band);
}
else
{
band = new OutlookBarBand(label);
}
band.Tag=group;
group.ReferenceWidget = band;
// band.GotFocus += new System.EventHandler(group.OnDisplay);
m_bar.Bands.Add(band);
band.SmallImageList = m_smallImages.ImageList;
band.LargeImageList = m_largeImages.ImageList;
object s = m_mediator.PropertyTable.GetValue("SidebarSize");
if (s ==null || (string)s=="small")
band.IconView= SidebarLibrary.WinControls.IconView.Small;
else
band.IconView= SidebarLibrary.WinControls.IconView.Large;
band.Background = SystemColors.AppWorkspace;
band.TextColor = Color.White;
//note that I had to fix the outlook bar code I downloaded to make this work.
//so if we download a new one and it stops working, go fix it again.
band.Font = new Font("Microsoft Sans Serif", 12);
}
}