Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Vile Smile on October 17, 2010, 03:33:00 pm
-
Is it possible to align text to the right or center?
Also, is it possible to determine the length of a string?
-
is this on the graphscreen or homescreen? and is it large text or small text?
both are possible, i'm just curious because small text would be difficult while large text on the homescreen would be relatively easy.
and yes, you can determine the length of a string
-
Length can be done with length(
As for aligning it, I can look into writing a method for you, but you'd have to calculate the pixel width of the text first.
-
With large font, aligning is a simple equation, but for small font, it gets a little more complicated.
-
Well wouldn't it only get hard with the small font when you branch away from the three pixel width?
-
My goal is to display a score (integer), but it is aligned along the right side of the screen. How would I find the number of digits in the score?
-
Crap, I keep forgetting to check what section this is in :P I keep thinking this is all TI-BASIC :P
Anywho, you might be able to do it the way Sir said, with the length( command. But I'm not sure. I only know how I would do it in TI-BASIC.
-
.S=Score (or any other number to align right)
.T=Temp
.X=x position of text
.Y=y position of text
91→X
S→T
While T/10→T
X-4→X
End
Text(Y,X,S▸Dec)
-
Thanks! Worked like a charm!