Ejemplo n.º 1
0
        private void RenderHeaderExpand(
            Graphics g, GridPanel panel, ref Rectangle r)
        {
            if (panel.ShowGroupExpand == true)
            {
                Rectangle bounds = _ExpandButtonBounds;

                if (IsVFrozen == false)
                    bounds.Y -= VScrollOffset;

                if (panel.IsSubPanel == true)
                    bounds.X -= HScrollOffset;

                bool hot = (_HitArea == GroupArea.ExpandButton);

                Image image = (Expanded == true)
                    ? panel.GetCollapseButton(g, hot) : panel.GetExpandButton(g, hot);

                ExpandDisplay.RenderButton(g, image, bounds, r);

                int n = panel.TreeButtonIndent +
                    (panel.LevelIndentSize.Width * IndentLevel);

                r.X += n;
                r.Width -= n;
            }
            else
            {
                r.X += 3;
                r.Width -= 3;
            }
        }