PC Review


Reply
Thread Tools Rate Thread

Drawing a table with GDI+

 
 
sklett
Guest
Posts: n/a
 
      12th Nov 2007
(I posted this in the drawing NG, but it doesn't get too much traffic and I
know many people are working with GDI+ so I thought I would try here as
well - hope nobody minds)

Hi,

I was working on a report over the weekend and needed to draw a table with
text in the cells. I managed to get it done, but the code is ugly and I'm
not happy about how fragile it is.

I planned on creating some classes to render a table, something like:
<code>
DocumentTable table = new DocumentTable(float width);
TableColumn column = table.AddColumn("Heading Text", float width);
TableColumn column = table.AddColumn("Heading Text 2", float width);
TableRow row = table.AddRow();
row.Cells[0].Text = "Text in the first cell";
row.Cells[1].Text = "Text in the second cell";

table.Draw(Graphics g);
</code>

Obviously it would be much more involved than that, but this is just an
example. The more I think about creating this table drawing class the more
I'm realizing how much work it will be! So I thought I would check here and
find out if any of you know of any open source projects, Code project
classes, etc that does something like this?

I'll create my own if I have to, but it would be much more efficient if I
could find something that's already created and extend (or contribute) to
it.

Thanks,
Steve



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Children Drawing Table Akerley@rolande.com Microsoft Access Reports 0 21st May 2009 05:14 AM
Children Drawing Table Akerley@rolande.com Microsoft Access Reports 0 21st May 2009 05:14 AM
How To Insert A Linked Drawing Into A Table =?Utf-8?B?R2FyeQ==?= Microsoft Access VBA Modules 0 27th Mar 2006 12:06 AM
Drawing borders in a table =?Utf-8?B?SmFjcXVlcw==?= Microsoft Frontpage 1 4th Feb 2006 03:01 PM
Drawing a table inside of a table Luc Microsoft Word New Users 1 23rd Aug 2005 10:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:20 AM.