5E Character Create Playlist
  1. #1

    Determine when <Enter> pressed in stringfield? Is there a better text entry field?

    I'm using a stringfield to have the user enter a string of text. I want to do something with it when they press <Enter>. However, what happens now is that when <Enter> is pressed, the text becomes highlighted.

    I looked in the API and there is a onValueChanged() callback for stringcontrol which stringfield inherits, and the ref doc says:

    Is called when the value of the string inside the control changes. This may result from finishing the editing of the string or the value changing externally from the control.
    When I test this, every character entered into the stringfield triggers onValueChanged(), not just "...result from finishing the editing of the string..." like it says.

    Two (ok, three) questions:

    1. Is there any way to detect when <Enter> is pressed and then do something with the entered string at that moment?

    2. If this isn't the control that can do this, but here is a better one, which one is it?

    3. Is there some other means to accomplish this?

    Thanks.
    Last edited by zuilin; October 14th, 2020 at 07:01.

  2. #2

  3. #3
    Bah. I’m a dummy. Somehow I missed onEnter. Didn’t realize the inheritance tree there. Thanks Moon Wizard.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in