textfield clearing

581 views
Skip to first unread message

Tom Eugelink

unread,
Dec 26, 2013, 3:35:47 PM12/26/13
to testfx-...@googlegroups.com


I'd like to type a new value in a textfield already holding a value (so "a" should become "c"). Now I click on the textfield, which places the cursor at the end, the I type "c" which results in "ac" in the textfield. How do I clear (or press backspace)?

Henrik Olsson

unread,
Dec 27, 2013, 10:03:00 AM12/27/13
to testfx-...@googlegroups.com
You can use JavaFX KeyCode for this, e.g. push(KeyCode.BACK_SPACE)

http://docs.oracle.com/javafx/2/api/javafx/scene/input/KeyCode.html#BACK_SPACE

However, I think that you are on to something when you mention a clear functionality. I'll add it to the issue list on Github.

Henrik Olsson

unread,
Jan 5, 2014, 9:22:31 AM1/5/14
to testfx-...@googlegroups.com

tbeernot

unread,
Jan 6, 2014, 12:47:59 AM1/6/14
to testfx-...@googlegroups.com
Great! Thanks!

Tom
--
You received this message because you are subscribed to the Google Groups "TestFX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testfx-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages