Justify text in a field

Lynch, Jonathan bnz2 at cdc.gov
Wed Jul 27 16:24:01 EDT 2005


You could have a script do this:
- get the formattedrect of a block of text
- calculate how far from the left of the field that block of text needs
to be
- insert a few spaces to the left of the block of text
- check the formattedrect of the block of text again
- keep inserting (or deleting if you go too far to the right) spaces
until item 1 of the formattedrect of the block of text is close enough
to be where it needs to be.
- if you really want to be neurotic, you can use spaces with a really
small font size, so that the width of a space is only 1 or 2 pixels!

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of MisterX
Sent: Wednesday, July 27, 2005 3:24 PM
To: 'How to use Revolution'
Subject: RE: Justify text in a field

Hi All

only with monospace fonts...
but it works horizontal or vertically ;)

sorry
Xav 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Alejandro Tejada
> Sent: Wednesday, July 27, 2005 20:29
> To: use-revolution at lists.runrev.com
> Subject: Justify text in a field
> 
> Hi Developers,
> 
> After reading these messages about
> Mac and Win fonts issues, i remember
> about a code that Colin Holgate
> contributed in the HyperCard list,
> that used text properties named
> extended and condensed to simulate
> justification in a text field.
> 
> This code does not work in RR.
> so, i ask this question to every
> developer:
> 
> Do you have working code to create justified text, or 
> something that resemble this, within a RR field?
> 
> Thanks in advance.
> 
> al
> 
> 
> Visit my site:
> http://www.geocities.com/capellan2000/
> 
> 
> 		
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 

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





More information about the use-livecode mailing list