Example #1
0
 private void Form1_Paint(object sender, PaintEventArgs e)
 {
     Cell c = new Cell();
     c.Rec = this.ClientRectangle;
     c.Text = "No Name";
     c.Paint(e.Graphics, this.Font);
 }
Example #2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            for (int i = 0; i < this.CellsCount; i++)
            {
                Cell c = this.cells[i];
                if (e.ClipRectangle.IntersectsWith(Rectangle.Round(c.Rec)))
                {
                    c.Paint(e.Graphics, this.Font);
                }
            }
        }