[Squeakland] RE : Value as Text
Dreyfuss Pierre-André (EDU)
pierre-andre.dreyfuss at edu.ge.ch
Thu Jun 14 10:05:49 PDT 2007
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 at squeakland.org de la part de subbukk
Date: jeu. 14/06/2007 08:59
À: squeakland at 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 at squeakland.org
http://squeakland.org/mailman/listinfo/squeakland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DecimalText.001.pr
Type: application/download
Size: 38837 bytes
Desc: DecimalText.001.pr
Url : http://squeakland.org/pipermail/squeakland/attachments/20070614/1613f1a0/DecimalText.001-0001.bin
More information about the Squeakland
mailing list