change bounds and alignment of ui label?

Hi there. I’m trying to upgrade my iPhone app to iPad with higher resolution images and orientation support. In my old code I create text boxes like this (as global variables, before any function declarations):

local myText = ui.newLabel{
bounds = { 30, 920, 70, 990 },
text = “Hello world”,
font = “Helvetica-Bold”,
textColor = { 255, 255, 255, 255 },
size = 16,
align = “left”
}
In my orientation change function, I want to be able to change the position of myText to reflect the orientation change (reason: this text has to be in different places depending on whether you’re in landscape or portrait mode). So initially I tried just

myText.x = some_new_value

Which appears to work initially, but myText can be updated by event listeners, and as soon as it is, the bounds go back to the original ones. I’ve tried

myText.bounds = { new_bounds_values }

in my original function but that has no effect at all. Would be great if anyone could highlight where I’m going wrong…
Thanks [import]uid: 5119 topic_id: 1362 reply_id: 301362[/import]

I am not using ui.lua (for a reason) but I suggest that you look at the source for it and adjust the behaviour of ui.newLabel() to your needs. I believe that there is some “magic” be done under the hood and you may need to update more than the x value. [import]uid: 6928 topic_id: 1362 reply_id: 3744[/import]