Example #1
0
        private Rectangle GetItemBounds(GridPanel panel, Image image,
            TextRowVisualStyle style, Rectangle r, out Rectangle tb, out Rectangle ib)
        {
            Rectangle v = ViewRect;

            if (panel.IsSubPanel == false)
            {
                r.X = Math.Max(r.X, v.X);
                r.Width = v.Width;
            }

            if (CanShowRowHeader(panel) == true)
            {
                r.X += panel.RowHeaderWidth;
                r.Width -= panel.RowHeaderWidth;
            }

            tb = GetAdjustedBounds(style, style.GetNonImageBounds(image, r));
            ib = style.GetImageBounds(image, tb);

            return (r);
        }