[Newbies] (no subject)

K. K. Subramaniam subbukk at gmail.com
Mon May 10 14:39:19 UTC 2010


On Monday 10 May 2010 12:01:58 am John Foster wrote:
> My problem is how to display a fraction so it looks like a fraction, and
> not like (2/5) + (7/8).  I want the vinculum to be a horizontal line:
> 
>  2     7      61
> --- + --- =  ----
>  5     8      40
You could use a Column morph with its border width set to zero and fill style 
set to transparent color. You may have to override cell positioning to bottom 
right to get numbers to align right (halo for Column ->menu->layout->table 
layout->cell positioning -> bottom right). Replace Red and Green morphs with 
Text containing numerator and denominator. Set Yellow morph's color to black, 
length to 3 and width to the max (numerator width, denominator width). 

Create Column morphs for first fraction, +, second fraction, =, total fraction 
and put them into a Row Morph.

HTH .. Subbu


More information about the Beginners mailing list