Is there a quick and easy way to draw a table on a winform? For my
university assignment, we are asked to practice drawing with GDI+, so we
are not allowed to use any built-in controls.

The table has 5 columns and 2 rows and the first row is the heading.
I guess I could use g.DrawRectangle() and g.DrawLine() repeatedly, but
that's too cumbersome, plus I want to achieve something like DrawRow(1)
to insert data to a cell.

Any good ideas?
Thanks
Walter

Re: Draw table with GDI+ by johndoe

johndoe
Wed Sep 29 09:30:11 CDT 2004

Using 2 simple for loops wo and a call to DrawRectangle would accomplish the
"drawing" aspect of the grid .



"Walter" <wwataus@yahoo.com> wrote in message
news:_Bf6d.3252$pl.53695@nasal.pacific.net.au...
> Is there a quick and easy way to draw a table on a winform? For my
> university assignment, we are asked to practice drawing with GDI+, so we
> are not allowed to use any built-in controls.
>
> The table has 5 columns and 2 rows and the first row is the heading.
> I guess I could use g.DrawRectangle() and g.DrawLine() repeatedly, but
> that's too cumbersome, plus I want to achieve something like DrawRow(1) to
> insert data to a cell.
>
> Any good ideas?
> Thanks
> Walter