public virtual void CalcBandInfo(MyTreeListViewInfo viewInfo)
        {
            MyTreeList TL = viewInfo.TreeList;

            Appearance.Assign(viewInfo.PaintAppearance.HeaderPanel);
            int VisiblePosition = Band.IndexToColumnHandle(0);
            int X = viewInfo.ViewRects.IndicatorBounds.Width + 1 - TL.LeftCoord;

            for (int i = 0; i < VisiblePosition; i++)
            {
                TreeListColumn Col = TreeList.RootBand.GetColumn(i);
                if ((Col != null) && Col.Visible)
                {
                    X += Col.Width;
                }
            }
            int Y     = (Band.Level - 1) * viewInfo.BandHeight + viewInfo.ViewRects.ColumnPanel.Y;
            int Width = 0;

            for (int i = 0; i < Band.Width; i++)
            {
                TreeListColumn Col = Band.GetColumn(i);
                if ((Col != null) && Col.Visible)
                {
                    Width += Col.Width;
                }
            }
            int Height = viewInfo.BandHeight + 1;

            if ((Band.Children.Count == 0) && (!Band.HasColumns()))
            {
                Height *= viewInfo.BandMaxLevel - Band.Level;
            }
            Bounds      = new Rectangle(X, Y, Width, Height);
            CaptionRect = new Rectangle(0, 0, Width, Height);
            Caption     = Band.Name;
        }
Пример #2
0
 public MyResourceInfo(MyTreeListViewInfo viewInfo)
     : base(viewInfo)
 {
 }