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

methods - python can't use function in submodule -

Java 3D LWJGL collision -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -