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:
Comments
Post a Comment