Tag: correctly

Displaying Fractions Correctly

Im trying to create a function that will displays fractions in a textfield in the correct format, because 1/4 or 1/2 isnt being accepted by e-learning people as the correct way to display a fraction. So to do this dynamically, i just thought about creating a 3 line dynamic textfield on the fly, placing the numerator of the fraction on the first line, a dash on the second line and the denominator on the third line and then changing the lineSpacing of the textfield to squeeze it all together vertically, but of course, this is the only property of the TextFormat object that is missing and thus cannot be set dynamically, nor can you pass a negative integer as a value for the TextFormat.leading property unless you specify it using the leading attribute of the textformat html node and pass it to the htmlText property of a textfield(Thanks to Peter Hall)….

Back To Top