navigate through textfield with keyboard?

  1. 5 years ago

    daninutero

    2 Feb 2019 User since 2019

    Similar question to this guy -- https://community.creolabs.com/index.php/330-navigate-through-textfield-next-done-buttons

    Hopefully this is possible now and I'm just not seeing it? I have a textfield and have to hit the button to search, pretty jarring on the ux.

    Thank you!

  2. marco

    2 Feb 2019 Administrator User since 2016

    @daninutero are you looking for a way to perform an action (like a search) while the user is typing in a textfield? If yes, then just write you search logics in the TextField.Changed event.

  3. daninutero

    3 Feb 2019 User since 2019

    @marco @daninutero are you looking for a way to perform an action (like a search) while the user is typing in a textfield? If yes, then just write you search logics in the TextField.Changed event.

    No I was hoping to do it for a particular key, like the return key. Not for every key stroke.

  4. marco

    4 Feb 2019 Administrator User since 2016

    Hi @daninutero, all you have to do is to set the nextField property of each TextField. Please see attached project (I set the property in the Window1.willShow event).

  5. daninutero

    4 Feb 2019 User since 2019

    @marco Hi @daninutero, all you have to do is to set the nextField property of each TextField. Please see attached project (I set the property in the Window1.willShow event).

    I can get yours to work, but if I set my nextField property to a button, it doesn't seem to do anything. How do I get the button to activate its Action event when I hit enter on the keyboard?

    Thank you for the support! I love the project by the way :)

  6. marco

    4 Feb 2019 Administrator User since 2016
    Edited 5 years ago by marco

    Ah! That's a different problem :-)
    So you do not want to move the focus but you'd like to know when the user stopped typing and then execute an action? In this case you should wait about 24 hours until the 2.0.2 version will be released.

    In that version we exposed the property endEditingOnReturn to the TextField inspector. When checked the DidEndEditing event is called when user presses the Return key.

    All you need to do in the DidEndEditing event is call the same function that you already call inside the `Button1.Action` event.

  7. Marc

    4 Feb 2019 User since 2018

    @marco In this case you should wait about 24 hours until the 2.0.2 version will be released.

    In that version we exposed the property endEditingOnReturn to the TextField inspector. When checked the DidEndEditing event is called when user presses the Return key.

    You guys are amazing. I was just looking for this in the docs when I stumbled upon this thread. Creo gets more mature by the day :)

  8. daninutero

    7 Feb 2019 User since 2019

    @marco Ah! That's a different problem :-)
    So you do not want to move the focus but you'd like to know when the user stopped typing and then execute an action? In this case you should wait about 24 hours until the 2.0.2 version will be released.

    In that version we exposed the property endEditingOnReturn to the TextField inspector. When checked the DidEndEditing event is called when user presses the Return key.

    All you need to do in the DidEndEditing event is call the same function that you already call inside the `Button1.Action` event.

    Amazing, thank you!

or Sign Up to reply!