-
October 14th, 2020, 06:58 #1
- Join Date
- Jan 2020
- Posts
- 222
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.
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.
-
October 14th, 2020, 07:24 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Have tried handling this event?
https://fantasygroundsunity.atlassia...ontrol#onEnter
Regards,
JPG
-
October 14th, 2020, 14:40 #3
- Join Date
- Jan 2020
- Posts
- 222
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)
Bookmarks