Hi,
The problem using the tile text numeric value <- Slider numericValue is the number of decimals if numbers are not integers.
To adjust the number of decimals, you can make a script with a parameter containing the smalltalk code :
decimals: t1 self setNumericValue: (Réglette getNumericValue asScaledDecimal: t1). self setCharacters: (self getCharacters truncateTo: (self getCharacters findString: 's') - 1)
See the attached project. The text as the script decimals: 5.
Use this tile in a script to adjust the number of decimals displayed. The text of course should contain a number.
Regards
-------- Message d'origine-------- De: squeakland-bounces@squeakland.org de la part de subbukk Date: jeu. 14/06/2007 08:59 À: squeakland@squeakland.org Objet : [Squeakland] Value as Text
Hi,
How do I make a TextMorph track the numeric value of another Morph (say SliderMorph's numericValue or Holder's count)? This is so I could use larger fonts and sizes for the numbers.
Thanks in advance .. Subbu _______________________________________________ Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland