On 29/03/2017 19:20, Jim Lambert via use-livecode wrote:
Now that I think about it, I’ve overcomplicated things.
You don’t need two fields at all.
Just set the liststyle of the field that contains your editable text to
‘decimal’.
Then the lines will be automatically numbered and outdented.
Yet conveniently, the ’text’ and the ‘styledtext’ runs will not ‘contain' the
numbering since it is a styling.
Of course, this still doesn’t allow you to get rid of the trailing period on
the numbers.
Not so quick, Jim :-)
This simpler method will indeed work for many (maybe most?) use cases.
However, this thread got started with Richard G. asking about
I have an app that allows the user to write styled text, in which any
portion of that text may have a variety of styles and sizes, and may
be long enough to soft-wrap.
I'd like to add a line-number field next to it, but I haven't come up
with an efficient way of setting up those line numbers so that they
align vertically with the lines next to them.
It's likely these user-applied styles should include numbered or
bulleted lists - which would clash with using decimal-numbered-lists for
line numbers.
So I think there's a good justification for both of your solutions
- the simple one for simple cases
- the two-field version where it is needed
-- Alex.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode