Page 1 of 1
Wordwrap to each line with fixed textbox height
Posted: Tue Feb 12, 2008 9:02 pm
by ymc
I have a Databand with a textbox height 8 and it can contain 50 characters.
Recently, I have more then 50 up to 4000.
So, I use a wordwrap and can grow function....However, I want to display first 50 characters in the first line textbox with no grow and the following 50 charaters in the second line textbox.
It is because I have a preprint form of dot matrix printer with the line on it. You can imaging you have a paper with line on it and write on the paper for each line.
For the wordwrap function you cannot control the height and the place for display.
Thus, how can I do it?
I would like to think about if wordwrap first count out how many line after wrapped, for example 5 line wrapped and create 5 count of the databand and put each line of wrapped word in the textbox and display another line of word in other count of databand.
One more thing, the databand have other textfield to display but those fields just need to display once, no need to display with the word wrapped databand.
Any idea?

Thx
Wordwrap to each line with fixed textbox height
Posted: Wed Feb 13, 2008 1:31 pm
by Vital
Hello,
If i right understand you can use property RenderTo of text component. Text component must have properties CanGrow and WordWrap = true.
Thank you.
Wordwrap to each line with fixed textbox height
Posted: Wed Feb 13, 2008 7:57 pm
by ymc
I think there may have some misunderstanding.
I have uploaded another pic for reference.
For the middle row the text need to separate into the pre-printed form line...if I just use the wordwrap and can grow function...I cannot control the space between each line thus the following records will shift the space up or down.
Thus, I would like to make the description textbox can wrap as the pic shown as to keep it printing in each pre-printed line.
Thx.

Wordwrap to each line with fixed textbox height
Posted: Sun Feb 17, 2008 9:49 pm
by ymc
Any idea?
Wordwrap to each line with fixed textbox height
Posted: Mon Feb 18, 2008 2:00 am
by Edward
ymc wrote:I think there may have some misunderstanding.
I have uploaded another pic for reference.
For the middle row the text need to separate into the pre-printed form line...if I just use the wordwrap and can grow function...I cannot control the space between each line thus the following records will shift the space up or down.
Thus, I would like to make the description textbox can wrap as the pic shown as to keep it printing in each pre-printed line.
The result you need can be achieved with help of the RenderTo property, custom defined function which adds a line break symbol after certain number of symbols in the input string and a set of textboxes. These textboxes must be placed directly on page for exact matching of your pre-printed form.
Please see the example report which is resolving the required task. Function SplitMyText is defined in the 'Code' tab. This function just adds line break symbols after each tenth symbol.
So each Text will contain exactly ten symbols per one StiText. Please note that all stiText in 'Wysiwyg' mode, because this method of rendering requires exact calculations of the height and width of the StiText component.
Thank you.
Wordwrap to each line with fixed textbox height
Posted: Mon Feb 18, 2008 3:12 am
by ymc
oh..thx...but how about using typograhic...coz I have chinese in it so the result come out with no chinese display just a not machine code.
Moreover, in the sample the number of textbox is fixed...But I would like to know any method can auto generate out the textbox box like
400/50 words per line --> 8 textbox fit with the line...and the remain record can foloowing the text splitted with the right position.
Wordwrap to each line with fixed textbox height
Posted: Mon Feb 18, 2008 7:00 am
by Edward
Ok, here is the decision based on all previous information.
Please open it in the Demo.exe example application from the standard delivery, because Demo database is used there.
Thank you.
Wordwrap to each line with fixed textbox height
Posted: Tue Feb 19, 2008 1:53 am
by ymc
Very Helful.
But another issue come out. I have send the sample mrt/database/screen shot to support[@]stimulsoft.com
Thx.