Put some text into an IOS text input field ?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Put some text into an IOS text input field ?

Post by FireWorx » Fri Feb 10, 2012 3:32 am

This is probably a simple question but was wondering exactly how to place some text into an IOS text field. I have gone through the dictionary, searched the IOS release notes and searched the forum.

I have established the field with the script below.

on inputCreate
if "testinput" is among the lines of iphoneControls() then
inputDelete
end if
  iphoneControlCreate "multiline", "testinput"
iphoneControlSet "testinput", "rect", the rect of graphic "InputRect"
iphoneControlSet "testinput", "visible", true
end inputCreate

So how would I go about placing vis script the text "My text data to enter" into that field?

Thanks
Dave

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Put some text into an IOS text input field ?

Post by Dixie » Fri Feb 10, 2012 3:51 am

Dave...

Code: Select all

global inputID
on mouseUp
      iphoneControlSet inputID, "text", "Boo-hoo"
end mouseUp
This will put 'Boo-hoo' into the UITextfield inputID

be well

Dixie

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: Put some text into an IOS text input field ?

Post by FireWorx » Fri Feb 10, 2012 4:57 am

=] Thanks!

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Put some text into an IOS text input field ?

Post by Jellicle » Fri Feb 10, 2012 7:49 am

You can use the same method to change almost all the properties of native controls. See the release notes for details :)

g
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply