HighTechTalks DotNet Forums  

Drawing tables

Dotnet Framework (Drawing) microsoft.public.dotnet.framework.drawing


Discuss Drawing tables in the Dotnet Framework (Drawing) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
sklett
 
Posts: n/a

Default Drawing tables - 11-12-2007 , 12:39 PM






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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.