Page 1 of 1

Line Wrapping - No Spaces

Posted: Fri Jan 03, 2014 9:40 pm
by robl
I know this is somewhat of a basic question, but I not encountered this previously in LiveCode.

I have a project with a label that displays web URLs within a form style datagrid. Some URLs may be extremely long, so I am trying to have the text wrapped into multiple-lines as necessary. It seems that LiveCode's "wrap / don't wrap" property only works when the text to be wrapped contains white space. Unfortunately, with URLs there are no spaces. I may have something similar to "https://server123456.california.usa.som ... 9&rate=400"

How can this be wrapped when displayed in the datagrid form? Does anyone have any suggestions on how to best implement this?

Thanks.

Re: Line Wrapping - No Spaces

Posted: Fri Jan 03, 2014 9:51 pm
by FourthWorld
A URL that long likely has little communicative value to the user. You might consider using an anchor tag in HtmlText, e.g.:

Code: Select all

<a href="https://server123456.california.usa.somecomplexdomainname.com/services/api/blah/something/index.php?request=new&type=inventory&sku=12345678901234&special=abc1234567890&start=1&end=99999&rate=400">Some Shorter, more readable label</a>

Re: Line Wrapping - No Spaces

Posted: Fri Jan 03, 2014 10:03 pm
by robl
FourthWorld wrote:A URL that long likely has little communicative value to the user. You might consider using an anchor tag in HtmlText, e.g.:

Code: Select all

<a href="https://server123456.california.usa.somecomplexdomainname.com/services/api/blah/something/index.php?request=new&type=inventory&sku=12345678901234&special=abc1234567890&start=1&end=99999&rate=400">Some Shorter, more readable label</a>
Thanks, Richard. I agree with you for most applications. However, for this specific project, the full URL must be displayed. The application is displaying URLs from a database where a system administrator needs to review the full URL as part of an auditing process. The app flags records based certain conditions, captures the full URL, and then waits for a human to review the record.

At this point I am thinking I may need to manually insert a CR every so many characters before displaying it.

Re: Line Wrapping - No Spaces

Posted: Fri Jan 03, 2014 11:00 pm
by FourthWorld
The manual insertion could work, or you could have a horizontal scroll bar present whenever the formattedwidth of the field exceeds the width.