I'd like to use a field for someone to enter a URL. The design means the text field can't be really wide – and a URL could easily be rather long. The problem is that it will pretty much always be a solid run of characters with no spaces, so there's no word-delimited way for the text to wrap neatly into multiple lines. The result is a clunky cropped view. I could give the field a horizontal scroll bar but that's only marginally less clunky.
Is there any possible way to have the text wrap 'blindly' when it reaches the field width? Or to have it wrap at a defined char, such as / or some other logical character?
k
Soft-wrap text string in field?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Soft-wrap text string in field?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
Re: Soft-wrap text string in field?
There have been several requests for this on the past, and the answer is still "you have to roll your own if you need this". It is not a standard feature on any operating system.
There are some links in this thread with info and stacks to try. (Read the thread through to the end.)
viewtopic.php?f=6&t=10810
There are some links in this thread with info and stacks to try. (Read the thread through to the end.)
viewtopic.php?f=6&t=10810
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Re: Soft-wrap text string in field?
BBEdit will soft-wrap text if that option is turned on in a document. It will prefer breaking using non-alphanumeric chars (/, punctuation, etc.) but if faced with an unbroken string of letters it will calmly wrap as necessary. If soft-wrap is turned on.
I regard BBEdit as pretty much a standard in serious text handling. (Never, EVER Word, of course!) This behaviour in BBEdit is exactly what I'd like to be able to optionally switch on for a given field in LiveCode.
I regard BBEdit as pretty much a standard in serious text handling. (Never, EVER Word, of course!) This behaviour in BBEdit is exactly what I'd like to be able to optionally switch on for a given field in LiveCode.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
Re: Soft-wrap text string in field?
The answer, I am afraid, is still "roll your own" if you need this in LiveCode. Try out the stacks in that thread and see what works for you.