One step forward, 3/4 steps back....
Here is the workaround code that sets up a field that can be typed in:
Code: Select all
if the environment is "mobile" then
put "input" into tControlType
mobileControlCreate tControlType, "myFirstInputField"
mobileControlSet "myFirstInputField", "visible", true
mobileControlSet "myFirstInputField", "rect", "50,50,100,100"
mobileControlCreate tControlType, "mysecondInputField"
mobileControlSet "mysecondInputField", "visible", true
mobileControlSet "mysecondInputField", "rect", "150,150,400,400"
set the vis of field "password" of this card to false
end if
Before I had this problem, my field's location was set in layout using this code:
set the top of field "password" of me to the bottom of field "label_getdocs" + tverticalspace
but the new workaround uses a rect...and so when I tried:
set the top of field "myFirstInputField" of me to the bottom of field "label_getdocs" + tverticalspace
it failed.
set the rect of field "myFirstInputField" of me to the rect of field "password"
also failed
Because the device size will vary, setting a specific rect, like "50,50,150,150" won't work.
So...how do I set it up so it resizes and repositions itself with the other items in the stack?
Also, I need a way that Livecode recognizes that this is a field - so I can call its contents. I'm not sure it understands field "myFirstInputField"
Thanks...