I need to be able to render overflow formatted text into an area whose width and height are different that the previous area in which the text did not fit.
I am able to change the height of the overflow text using the "info.OverflowFormattedTextArea.Height = newHeight" statement but I get an exception if I try to resize the width. Why is that?
What is the process (if any) of accomplishing this task?
Ehsan
OverflowFormattedTextArea
Re: OverflowFormattedTextArea
Support · Aug 8, 2008Hello Ehsan,
Currently it is not possible to change the width of the FormattedTextArea. You can change the X, Y, and Height using the properties or by using the GetOverflowFormattedTextArea method which takes these values as parameters.
You may have to use the TextArea page element which allows you to change the width also without any problem.
Thanks,
ceTe Software Support Team.
Re: OverflowFormattedTextArea
Forum member · Aug 8, 2008I have to use formatted text because using the text area type will prevent the HTML mark-ups within my text stream from displaying correctly.
I will try to work around this. Thank you.
Ehsan
Re: OverflowFormattedTextArea
Forum member · Apr 29, 2010Did you ever find a work around to this problem? I have the same situation by trying to incorporate an image into the beginning of my formatted text. I have a 70 x 70 image area and a 400 wide, 70 tall formatted text area next to it. I am then overflowing into a full page width text area below it, however, as previously mentioned, you cannot change the width of a formatted text area.
I am currently trying to use a Text Area but I don't see where I can control line spacing. This may be a serious roadblock if I can't figure out a workaround.
Re: OverflowFormattedTextArea
Forum member · Apr 29, 2010What I had to do was the following set of steps:
1. Calculate the height of area in which the formatted text will be inserted
2. Construct a new formatted text area within a loop by adding information from original until calculated height is reached
3. Add new formatted text area to page
4. Construct a new formatted text area with left-over information from step 2 using new width and height area values
5. Add formatted text area to page.
Re: OverflowFormattedTextArea
Forum member · May 4, 2010I thought I could get around this using just TextArea, but I need to occasionally place a Bold tag somewhere in the text, which means I have to use FormattedTextArea.
I then tried using the <P LEFTINDENT=70> in my original text and stick <P LEFTINDENT=0> in front of the overflow text, but that just results in an OverFlowArea Text cannot be read error. Doesn't make sense that you can't reference the text passed by an overflow.
Would you mind sharing a code snippet for how you fill your initial FormattedTextArea? I'm curious if you do it word by word and how you test for when overflow is reached.
Thanks,
Eric
Re: OverflowFormattedTextArea
Support · May 5, 2010Hello Eric,
Yes, the overflow formatted text area does not allow to access its text and it is not possible to change the Width of the overflow formatted text area also.
In this case you may have to process the text by adding word by word as you said to break the text which can fit in the given height for the first part and then add the remaining text using a new FormattedTextArea object with a different width value.
You may use the TextArea class which can give the required height of the text using the GetOverflowTextArea method. You will have to add the text to the TextArea until it fits in the given height. Then you can add the FormattedTextArea to add this text to the page. However this may not give exact values as the TextArea considers the HTML tags also as normal text.
Thanks,
ceTe Software Support Team.
Re: OverflowFormattedTextArea
Forum member · May 25, 2010I've tried all sorts of variations on accomplishing this and I'm very close except for one issue.
I was able to get it to work fine adding elements from a "word" array plus a space to a string variable, defining a new Formatted Text Area over and over until "Has Overflow" is triggered. I created the Formatted Text Area using the text up to, but not including, the word that caused the overflow. I add the Formatted Text Area to the page, then add the rest of the text to a wider Formatted Text Area.
That process works great, except that the last line of the indented area is not justified.
So, I modified my code to leave in the word that triggers the overflow, thinking that the overflow part won't output to PDF and the last line will be justified. However, what is now happening is that I'm losing the last two lines, not just the single overflow word.
I verified this by changing the height of the FTA to "Get Required Height" which outputs six lines in my case, the sixth line being the single overflow word. So I modified my code to set the FTA.Height = FTA.GetRequiredHeight - 1 which I assume would remove the overflow word on the last line, instead it removes the last two lines. Is this a bug with the FTA functionality?
I'm currently working on a little test program to prove this is the case and not something I'm doing. I would be happy to provide the source code for this test.
Thanks,
Eric
Re: OverflowFormattedTextArea
Support · May 25, 2010Hello Eric,
Can you please send over sample code using which we can recreate the behavior on our end to our [^a|mailto:support@cete.com|opennewwindow|Support Team^] so that they can look into it further?
Thanks,
ceTe Software Support Team