Preventing or Removing Line Breaks when Text is Entered

JoeBJoeB Member Posts: 160

I'm using an 'enter name' feature in my app and would like to remove the line break if the user were to press 'return' while using the game salad keyboard entry function. I don't think I'd want to make a custom keyboard as it is a small app.

Currently, if the user presses return, the name moves up when it is displayed and it ruins part of the app.

Can anyone please help? Thank you.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I think you could parse out the line breaks if you knew the ascii symbol and used the textReplaceAll() function.

  • ArmellineArmelline Member, PRO Posts: 5,421

    textReplaceAll( self.TextAttribute ,"\n","")

  • JoeBJoeB Member Posts: 160

    @Armelline that worked perfectly! Thanks a lot!

Sign In or Register to comment.