Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

how i disable new line in native.newTextBox ?
Started by booo.mta Oct 31 2019 02:17 AM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

booo.mta

[GLOBAL: userInfoPane.html]
booo.mta
  • Observer

  • 2 posts
  • Corona SDK

hii there
 
how i i disable the  new line with native.newTextBox ?
 




[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,175 posts
  • Corona SDK

If you want to limit the user to a single line, you may want to use newTextField instead, see https://docs.coronalabs.com/api/library/native/newTextField.html.


  • booo.mta and pixec like this

[TOPIC: post.html]
#3

booo.mta

[GLOBAL: userInfoPane.html]
booo.mta
  • Observer

  • 2 posts
  • Corona SDK

If you want to limit the user to a single line, you may want to use newTextField instead, see https://docs.coronalabs.com/api/library/native/newTextField.html.

 

thank you , and how can i change maximum letters for text field



[TOPIC: post.html]
#4

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,960 posts
  • Corona SDK

Just check the length of the string in the listener when the field is edited, and truncate it if necessary.



[TOPIC: post.html]
#5

walton19

[GLOBAL: userInfoPane.html]
walton19
  • Observer

  • 1 posts
  • Corona SDK

If you want to limit the user to a single line, you may want to use new walmart one wire TextField instead, see https://docs.coronalabs.com/api/library/native/newTextField.html.

I had same question. Thank you so much for your answer




[topic_controls]
[/topic_controls]