Hello!
Ok, so I'm having an issue with Table.FontSize, or maybe I just don't fully understand why it is a get/set property.
I have a table that gets its rows populated dynamically from an XML file. If the data in the rows causes OverflowRows, I want ALL the text in the table to be recursively resized, until all the data fits on a single page (the table no longer has OverflowRows).
What I'm doing is this (in pseudocode):
Create Table
foreach XmlRow in XMLFile
{
add new TableRow to Table;
add cells to TableRow from XML;
}
while (Table.HasOverflowRows())
{
Table.FontSize -= 1;
}
The only problem is, the process gets caught in an infinite loop. I let it run for a bit then checked the value of Table.FontSize and it was like -41000.
The documentation isn't too clear, but I was under the impression that if I change the FontSize property of a Table object, it should in turn automagically re-size all the text in all the cells. This must not be the case, otherwise I wouldn't get stuck in the infinite loop!
Am I missing a step? Is there a method that I need to call AFTER decrementing the Table.FontSize property to "redraw" all the text in all the cells? If that is impossible, then why can you even set the value of Table.FontSize? Shouldn't it just be a read-only property in that case?
Thanks for your help!!
-Mike
Re-sizing all text in a table
Re: Re-sizing all text in a table
Support · Sep 7, 2006Hello Mike,
After reviewing your code everything looks okay logically. I do think however you may have stumbled upon an issue. I was also able to re-create the infinite loop when testing this in a similar app here. It looks like the table was able to expand the row size as the font size increase but it was not resizing the rows correctly as the font size decreased (and therefore creating the infinite that we find).
I do think that this is something that can be address and resolved shortly. Please send us an email to [^a|mailto:support@cete.com|support@cete.com^], referencing this forum post. Once we have your email address, we will then be able to update you directly and send you any new build that will fix this issue.
Thanks,
ceTe Software Support Team