Esempio n. 1
0
        static void DrawDash(Graphics g, GridContainer item, GridPanelVisualStyle style,
            Pen pen, Rectangle r, Rectangle t, int n, bool hasButton)
        {
            int x = r.X + r.Width / 2 + 1;
            int y = r.Y + r.Height / 2;

            GridPanel ppanel = item.GetParentPanel();

            if (ppanel.CheckBoxes == true && item.ShowCheckBox == false)
            {
                r.Width += ppanel.CheckBoxSize.Width;

                if (item is GridPanel)
                    r.Width += 4;
            }

            if (t.Width > 0 && r.Right > t.Left - n)
                r.Width -= r.Right - (t.Left - n);
            
            if (r.Width > 0)
            {
                if (style.TreeLinePattern == LinePattern.Dot)
                {
                    x++;

                    if (hasButton == false)
                    {
                        if (y % 2 == 0)
                            y--;
                    }
                    else
                    {
                        y -= 2;
                    }
                }

                g.DrawLine(pen, x, y, r.Right, y);
            }
        }
Esempio n. 2
0
        internal void InvalidateRowHeader(GridContainer row)
        {
            if (row != null)
            {
                GridPanel panel = row.GetParentPanel();

                if (panel != null)
                {
                    if (panel.ShowRowHeaders == true)
                    {
                        Rectangle bounds = panel.BoundsRelative;

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

                        bounds.Y = row.ContainerBounds.Y;

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

                        bounds.Width = panel.RowHeaderWidth;
                        bounds.Height = row.ContainerBounds.Height;

                        InvalidateRender(bounds);
                    }
                }
            }
        }