In-line Fraction with Horizontal Line

Ken Ray kray at sonsothunder.com
Tue Mar 7 03:01:59 EST 2006


> I could use some help on this one.

You can use the "textShift" property to move text above/below the baseline.
For example, make a field with 24 point font (I used Lucida Grande but you
can use what you want), and set the fixedLineHeight of the field to true.

Enter the equation like this:

y =  4 x + 2
       5

(that's 7 spaces before the "5" on the second line, and note there are 2
spaces between the "=" and the "4" on the first line)

Then open the message box and type these commands:

  set the textShift of char 1 to 3 of line 1 of fld 1 to 9
  set the textShift of char 8 to 12 of line 1 of fld 1 to 9
  set the textStyle of char 5 to 7 of line 1 of fld 1 to underline
  set the textShift of char 8 of line 2 of fld 1 to -9

You get the idea... play around with the textShift and the margins of the
field, and you should get something you like.

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the Use-livecode mailing list