protected override void ResizeColumn(int index, int byUnits, int maxPossibleWidth)
 {
     if (ViewInfo.BandLinks.ContainsKey(VisibleColumns[index]))
     {
         MyTreeListBandCollection childBands   = ViewInfo.BandLinks[VisibleColumns[index]].Band.Children;
         TreeListColumn[]         childColumns = ViewInfo.BandLinks[VisibleColumns[index]].Band.Columns;
         int unitsPerChild = byUnits / (childBands.Count + childColumns.Length);
         foreach (MyTreeListBand band in childBands)
         {
             if (band.Visible)
             {
                 ResizeColumn(band.BandColumn.VisibleIndex, unitsPerChild, maxPossibleWidth);
             }
         }
         foreach (TreeListColumn col in childColumns)
         {
             if (col != null && col.Visible)
             {
                 ResizeColumn(col.VisibleIndex, unitsPerChild, maxPossibleWidth);
             }
         }
     }
     else
     {
         base.ResizeColumn(index, byUnits, maxPossibleWidth);
     }
 }
 public MyTreeList()
     : base()
 {
     Bands                  = new MyTreeListBandCollection(this);
     fRootBand              = Bands[0];
     this.PopupMenuShowing += onPopupMenuShowing;
 }
 public MyTreeListBand(MyTreeList TreeList, MyTreeListBand parent, int position, int width, string name)
 {
     fTreeList   = TreeList;
     fChildren   = new MyTreeListBandCollection(this, TreeList.Bands);
     fColumns    = new TreeListColumn[width];
     fParent     = parent;
     fName       = name;
     fPosition   = position;
     fLevel      = (Parent == null) ? 0 : Parent.Level + 1;
     fBandColumn = null;
     fVisible    = true;
 }
Esempio n. 4
0
 public MyTreeListBandCollection(MyTreeList treeList)
 {
     fRootBand = new MyTreeListBand(treeList, null, 0, treeList.Columns.Count, string.Empty);
     List.Add(fRootBand);
     fTreeListBands = null;
 }
Esempio n. 5
0
 public MyTreeListBandCollection(MyTreeListBand RootBand, MyTreeListBandCollection TreeListBands)
 {
     fRootBand      = RootBand;
     fTreeListBands = TreeListBands;
 }