Hello,
I am having a little trouble with the unordered list GetOverFlowList.
The list will flow off the page and return null from the GetOverFlowList method.
Is the GetOverFlowList only related to overflow from the height the list is set to, which in my case IS the required height, and not the overflow from the page, as the FormattedTextArea appears to work?
My Code, list creation missing(but working properly):
UnorderedList list = new UnorderedList(0, _pageElemHeight, colWidth, 100, fontWhitney, 10);
//create the list(lots of, hopefully, irrelevant code)
do
{
//set list height to required height(set to 100 before knowing)
list.Height = list.GetRequiredHeight();
// Add element
page.Elements.Add(list);
// Add to current page height
_pageElemHeight = _pageElemHeight + list.Height;
if (_pageElemHeight >= _pageHeight)
addPage();//Adds page,create new page,reset _pageElemHeight
// Create leftover list
list = list.GetOverFlowList(0, _pageElemHeight);
} while (list != null);
List Overflow
Re: List Overflow
Support · Apr 10, 2008Below is the logic you need to be using for taking care of the overflow list:
// Set the UnorderedList object equal to the rest of the text that did not fit if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(0,0);
while(list!=null){
page1= new Page();
page1.Elements.Add(list);
doc.Pages.Add(page1);
list = list.GetOverFlowList(0,0);
}
This way you will not have to track if there is sufficient height to fir the List on the page and handle the list overflow automatically.
Thanks,
ceTe Software Support Team
Re: List Overflow
Forum member · Apr 10, 2008The problem I am having is I need to set the height to the required height, for the list and the over flow list, after the list is created. I need to know what the required height of the list is to position the other items on the page around the list. I am doing this for a FormattedTextArea with no problem, but the list is not working in the same manner. Can you show an example of hwo to do this with a list?
Thanks!
Re: List Overflow
Forum member · Apr 11, 2008One more thing: the code you provided works, until I add this line of code -
// added before the element is added to the page
_pageElementHeight = list.GetRequiredHeight();
Is there another way I should determine how much space is needed for the list?
Re: List Overflow
Support · Apr 11, 2008Hello,
We identified a bug when using the GetRequiredHeight() method of the List page element. The bug has been fixed in Build 80411 or later. Please send an email to our [^a|mailto:support@cete.com|Support Team^], so that we can send you the DLL files. We will be releasing the new DLL files very soon on our web site.
Thanks,
ceTe Software Support Team