[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

sigmundlo

3/1/2006 10:01:00 AM

I have found out that in Axapta 2.5 a text control will not wrap a long
string if the width is set to auto. I even experienced that trying to display
a string longer than 264 characters in a text control with auto width will
shut down Axapta! Without any notice or message.

So I need to set the width of the text control, then wrapping works. But I
must find out how many lines it will be so I can set the height of the
control.

How can I "ask" a string "how many lines will you be after wrapping into a
text control x characters or x millimeters wide"?

Thank you
1 Answer

sclifford

3/1/2006 10:43:00 PM

0

In the excute section of report I use:

real nameHeight;

nameHeight =
this.controlName("Name").heightOfWordWrappedString100mm(custInvoiceTrans.Name);

if (nameHeight != this.controlName("Name").height100mm())
this.controlName("Name").height100mm(nameHeight);

I've set the field to 32 wide and the above figures out how high to make it.
This works in 2.5 for reports.


"sigmundlo" wrote:

> I have found out that in Axapta 2.5 a text control will not wrap a long
> string if the width is set to auto. I even experienced that trying to display
> a string longer than 264 characters in a text control with auto width will
> shut down Axapta! Without any notice or message.
>
> So I need to set the width of the text control, then wrapping works. But I
> must find out how many lines it will be so I can set the height of the
> control.
>
> How can I "ask" a string "how many lines will you be after wrapping into a
> text control x characters or x millimeters wide"?
>
> Thank you