Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

can't get newText() to align left
Started by hebchop Feb 11 2010 06:05 AM

- - - - -
2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

hebchop

[GLOBAL: userInfoPane.html]
hebchop
  • Observer

  • 5 posts
  • Corona SDK

I'm creating a Text Object using display.newText() and I cannot seem to find a way for it to align "left" when I update it later.

Here is what I'm trying:
timerText = display.newText( "0.00", 0, 0, "Impact", 23 ) 
timerText.align = "left"
timerText:setReferencePoint(display.TopLeftReferencePoint)

and later inside of a timer event listener where the target is timerText:
self.text = count*.1

When I update it always defaults to left. Am I doing anything wrong?
uid: 2997 topic_id: 490 reply_id: 300490


[TOPIC: post.html]
#2

hebchop

[GLOBAL: userInfoPane.html]
hebchop
  • Observer

  • 5 posts
  • Corona SDK

ahh, looks like should be using "label" no?
uid: 2997 topic_id: 490 reply_id: 953


[TOPIC: post.html]
#3

hebchop

[GLOBAL: userInfoPane.html]
hebchop
  • Observer

  • 5 posts
  • Corona SDK

Yes. I did,
self:setText(count*.1)
instead of
self.text = count*.1
and it kept the formatting.

hope that helps somebody.
uid: 2997 topic_id: 490 reply_id: 954



[topic_controls]
[/topic_controls]