Moving Text Fields in a DisplayGroup not working.. Why Not?

I create several labels and text fields, and buttons.
I then add them to the display group called fields
I then ( i know lots of I then’s ) attempt to move the displayGroup to ( y position with a transition.to )

Everything on the screen moves to the correct “Y” position except for the textfields, they stay where they are.

Any clue why? or how to fix?

local fields = display.newGroup()  
local txtField = native.newTextField( 20, 50, 100, 18 )   
fields:insert(txtField);  
  
local Label1 = display.newText( "Sample Label", 20, 25, native.systemFont, 12 )  
fields:insert(Label1);  
  
 transition.to( fields, { time=500, y=-50 } )  

I hope i got all the sample code.
But anyway everything runs, there are no errors but the textfields never move on the screen

any Help would be so wonderful. [import]uid: 11860 topic_id: 32840 reply_id: 332840[/import]

I don’t think native stuff can be inserted into a group. I have just started using textfields in my app and although it was a old blog post I was reading, it said they couldn’t.

Dave [import]uid: 117617 topic_id: 32840 reply_id: 130539[/import]

I don’t think native stuff can be inserted into a group. I have just started using textfields in my app and although it was a old blog post I was reading, it said they couldn’t.

Dave [import]uid: 117617 topic_id: 32840 reply_id: 130539[/import]

Here is what I have found so far, and this is not good ( simulator testing so far )
I have this code.

local fields = display.newGroup()  
local txtField = native.newTextField( 20, 200, 100, 18 )   
fields:insert(txtField);  
   
local Label1 = display.newText( "Sample Label", 20, 200, native.systemFont, 12 )  
fields:insert(Label1);  
  
---Move Fields Group up the screen 50 points / twips / pixels - whatever - from current position  
transition.to( fields, { time=500, y=fields.y - 50 } )  
  
---Since Native TextField did not move then we need to move it as well.  
transition.to( txtField, { time=500, y=txtField.y - 50 } )  

Now everything move up the screen like it should BUT the text field move farther up the screen than the display group - WHY IN THE WORLD IS THAT!!

IT APPEARS that when you move the textField.y -50 then its moving like 100… I have tripple checked my code and this should not be happening…

Lost in cyber space on this one. I have to wonder will this act different on the device than simulator and what about on android… let the crying begin.

Larry
[import]uid: 11860 topic_id: 32840 reply_id: 130569[/import]

Here is what I have found so far, and this is not good ( simulator testing so far )
I have this code.

local fields = display.newGroup()  
local txtField = native.newTextField( 20, 200, 100, 18 )   
fields:insert(txtField);  
   
local Label1 = display.newText( "Sample Label", 20, 200, native.systemFont, 12 )  
fields:insert(Label1);  
  
---Move Fields Group up the screen 50 points / twips / pixels - whatever - from current position  
transition.to( fields, { time=500, y=fields.y - 50 } )  
  
---Since Native TextField did not move then we need to move it as well.  
transition.to( txtField, { time=500, y=txtField.y - 50 } )  

Now everything move up the screen like it should BUT the text field move farther up the screen than the display group - WHY IN THE WORLD IS THAT!!

IT APPEARS that when you move the textField.y -50 then its moving like 100… I have tripple checked my code and this should not be happening…

Lost in cyber space on this one. I have to wonder will this act different on the device than simulator and what about on android… let the crying begin.

Larry
[import]uid: 11860 topic_id: 32840 reply_id: 130569[/import]

Ok this is going to Freek you out.

If you “FIRST” move the textField like shown below, then you move the entire group to a different spot.

EVERYTHING MOVES - INCLUDING THE TEXTFIELD…

---Move Fields Group up the screen 50 points / twips / pixels - whatever - from current position  
transition.to( fields, { time=500, y=fields.y - 50 } )  
   
---Since Native TextField did not move then we need to move it as well.  
transition.to( txtField, { time=500, y=txtField.y - 50 } )   

Now just have a click event or something to trigger moving the entire fields displayGroup, now THE ENTIRE GROUP MOVES - INCLUDING THE TEXTFIELD… CORONA - WHATS GOING ON HERE.

transition.to( fields, { time=500, y=fields.y + 50 } )  

IF native text fields should not move as part of the group then why are they moving “AFTER” you move them specifically by themself and then just move the group… - this is nuts…

I think they should move as part of the display group.

This is a BUG.

Larry
[import]uid: 11860 topic_id: 32840 reply_id: 130571[/import]

Ok this is going to Freek you out.

If you “FIRST” move the textField like shown below, then you move the entire group to a different spot.

EVERYTHING MOVES - INCLUDING THE TEXTFIELD…

---Move Fields Group up the screen 50 points / twips / pixels - whatever - from current position  
transition.to( fields, { time=500, y=fields.y - 50 } )  
   
---Since Native TextField did not move then we need to move it as well.  
transition.to( txtField, { time=500, y=txtField.y - 50 } )   

Now just have a click event or something to trigger moving the entire fields displayGroup, now THE ENTIRE GROUP MOVES - INCLUDING THE TEXTFIELD… CORONA - WHATS GOING ON HERE.

transition.to( fields, { time=500, y=fields.y + 50 } )  

IF native text fields should not move as part of the group then why are they moving “AFTER” you move them specifically by themself and then just move the group… - this is nuts…

I think they should move as part of the display group.

This is a BUG.

Larry
[import]uid: 11860 topic_id: 32840 reply_id: 130571[/import]

You can’t insert them into a display group and as you still are, I presume that is what’s messing things up.

Remove the line from your code and see what happens.

Dave [import]uid: 117617 topic_id: 32840 reply_id: 130572[/import]

You can’t insert them into a display group and as you still are, I presume that is what’s messing things up.

Remove the line from your code and see what happens.

Dave [import]uid: 117617 topic_id: 32840 reply_id: 130572[/import]