Select a part of the text in a TextField

0

I want to select a part of a text in a control javaFX TextField in the same way I did with Java in a JTextField like this:

controlTexto.setSelectionStart(inicio);
controlTexto.setSelectionEnd(final);
    
asked by 01.09.2016 в 15:49
source

1 answer

0

The correct way to select a text within a control TextField in JavaFX is by the method selectRange:

miTextField.selectRange(posiciónInicial, cantidadCaracteres);
    
answered by 01.09.2016 / 16:09
source