Multiple Alignments In One Line?

Scott Rossi scott at tactilemedia.com
Thu Apr 4 00:47:00 EDT 2013


Thanks Paul.

Yes, I was hoping the new text properties might accommodate more robust alignment. I wound up using some basic tab stops and just living with the result.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design

-------- Original message --------
Subject: Re: Multiple Alignments In One Line? 
From: Paul Hibbert <lc at pbh.on-rev.com> 
To: How to use LiveCode <use-livecode at lists.runrev.com> 
CC:  

Scott,

I'm sure you already know that you would usually do this with tabs in a word processor, AFAIK you can't normally apply both left and right text align on the same line.

Looking at the tabStops property in LC, there doesn't appear to be a way to control left and right alignment of the stops, it looks like they only work well with left align.

Dictionary Quote:
Setting the field's textAlign to center or right may cause unexpected results when using tab stops.

If you use a mono-spaced font for the field, then you could just count the number of chars and just add spaces, not elegant, but could work, although I'd guess you would prefer elegant!

I had a play with scripting the tabStop to match a text selection to achieve a similar result (without resorting to mono-spaced fonts). It's not perfect, it works, but it may not be exactly what you are looking for, the test stack is here if it helps…

https://www.dropbox.com/s/twas5ofcko73r53/Tab%20Stops%20Test.livecode

Paul


On 2013-04-03, at 3:05 PM, Scott Rossi wrote:

> Anybody know if it's possible to use two different text align settings on
> the same line using the (newish) styledText property?
> 
> I want to have the first few words of a line aligned left in the field, and
> the last few words aligned right.
> 
> Thanks & Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list