java - Select/mark specific word in SWT Textfield -


i've got swt textfield text added automatically. want select specific phrase in text automatically, user replace without manual selection. i've found in api selectall() method, works selects text, not specific part.

is there way so?

text#setselection(int start, int end) need.

example:

text text = new text(shell, swt.border); text.settext("this random text"); text.setselection(5, 7); 

looks this:

enter image description here


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -