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

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -