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.
Line Wrapping - No Spaces
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Line Wrapping - No Spaces
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>
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Line Wrapping - No Spaces
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.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>
At this point I am thinking I may need to manually insert a CR every so many characters before displaying it.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Line Wrapping - No Spaces
The manual insertion could work, or you could have a horizontal scroll bar present whenever the formattedwidth of the field exceeds the width.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn