I have a problem when adding table rows from a recordset, i'm getting the overflow rows and adding them which is fine until the row contains more text than will fill a page, is is possible to determine when this will happen and add another page to accomodate the row?
Table Overflow row height
Re: Table Overflow row height
Support · Jan 18, 2006The table will always show one cell even if that cell is heigher than the height of the table.
To get around this, instead of adding the text directly to the cell, add a text area containing the text with the height of the table. You can then check if the text area has an overflow and if so, add the overflow text area to the next cell. If it does not, then increment the recordset and add the next record.
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Forum member · Jan 18, 2006thanks for the reply, could you point me in the direction of how to add a tex area to a cell?
Regards
Re: Table Overflow row height
Forum member · Jan 18, 2006what would you suggest for setting the height of the textarea?
sometimes it will be 1/4 of a page sometimes more.
Regards
Re: Table Overflow row height
Support · Jan 18, 2006Sure, take a look at the SetTextArea Method of the cell:
SetTextArea Method
This page contains a description of the method as well as a code snippet.
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Forum member · Jan 18, 2006thanks for the reply,
what about positioning the textarea and setting the hieight and width dynamically?
Re: Table Overflow row height
Forum member · Jan 18, 2006also, is it possible to actually add an overflowtextarea to directly to a cell?
Re: Table Overflow row height
Support · Jan 18, 2006This will work best if the height is set to the height of the table minus the cell padding (top and bottom).
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Support · Jan 18, 2006The overflow text area can be added to the next cell using the cell's SetOverflowTextArea method:
SetOverflowTextArea Method
There is no problem with positioning the textarea or setting its hieght and width dynamically. The positioning will be from the top left corner (after the padding) of the cell.
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Forum member · Jan 18, 2006thanks for the reply,
i can't see anything in your help about adding an overflowtextarea to directly to a cell though?
Re: Table Overflow row height
Forum member · Jan 18, 2006It's not ideal to be honest, some of the cells would normally only be 2 lines, but if i set the textarea to the height of the table they will take up the whole page
Re: Table Overflow row height
Support · Jan 18, 2006Sorry I missed that. You should set the height of the text area to the value of the text area's GetRequiredHeight method. If this is greater than the height of the table, set it to the table height.
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Forum member · Jan 18, 2006Thanks for the reply again,
at what point can i use getrequiredheight if i am setting a text area like this:
Dim MyCellTextArea
Set MyCellTextArea = TextCell.SetTextArea( textHeight & " - " & field2, 0, 0, 400, <need dynamic height here>)
Re: Table Overflow row height
Support · Jan 18, 2006Something like this would work:
Dim MyCellTextArea
Set MyCellTextArea = TextCell.SetTextArea( textHeight & " - " & field2, 0, 0, 400, MyTableHeight)
If MyCellTextArea.GetRequiredHeight() < MyTableHeight Then
MyCellTextArea.Height = MyCellTextArea.GetRequiredHeight()
End If
Thanks,
ceTe Software Support Team
Re: Table Overflow row height
Forum member · Jan 18, 2006Thanks for your help, got it working quite weel.
Regards