textBox Problem

Is there any way resize the textBox without affecting to text (textBox.text ="Hello World")

for example

function resize(event)
if ( "began" == event.phase ) then
textBox.height = 200
end
end

textBox = native.newTextBox(0, 0, display.contentWidth , display.contentHeight,resize)

textBox.isEditable = true
textBox.text = "Hello World"
textBox.size = 18

That code you just wrote should work fine to change the size of the box while the text remains the same.

Peach :)

Thanks Peach for the fast respond . In the Corona simulator works fine .. But in the IOS simulator or iphone device look diffrent .. try it and let me know if you can fix this please.

Best Regards ,
ALORFI

Hey Alorfi,

I just did a build to test this and you're right, that's certainly inconsistent with the simulator.

Can you please file a bug report using this form; http://developer.anscamobile.com/content/bug-submission

For the time being I'd suggest either creating a new text box or alternatively making the text box look larger than it is initially. (Although I'm not sure why you would make a textbox then immediately shrink it so may have a different opinion if you'd like to provide more insight.)

Peach :)

Actually I'm trying to write a Note application where the user can write Notes in full screen.
But if the keyborad has appeared, the text in the bottom will be behind the keyborad and the user unfortunatly cannot see what he wrote .. :(

any alternative soultion ...

Thanks

Well the textbox will scroll on device/xcode simulator when the text goes beyond the height of the box.

So perhaps you make it look like it's full screen but it is in fact only covering the upper screen.

Then once the user is done, you could take the entered text and use it to fill a newly create full screen box.

Does that make sense?

Peach :)

YES. This is good idea and it works .. but when the user want edit the text he will tap the line in the textBox and then the new text box will appear in the first line instead or in the end .. assume we have long note about 100s line

Thanks Peach :)

It's not fool proof, unfortunately - but did you file a bug report? It's the only way to get this kind of thing fixed.

Peach :)

Yes I did, Hopefully this issue will be fixed soon

views:1040 update:2011/11/28 11:38:31
corona forums © 2003-2011