Link to home
Start Free TrialLog in
Avatar of directxBOB
directxBOBFlag for Ireland

asked on

SWT Text : Select part of the text?

I have a textbox which I want to select the last two characters of.

So for example:

88.00

I would like to select the 00 only.

Thanks
Avatar of ksivananth
ksivananth
Flag of United States of America image

in swings,

textField.select( 3, 4 ) ;
Avatar of directxBOB

ASKER

I don't seem to have a select option. I have selectAll, setSelection
what are the params for setSelection?
int Start
Point selection
int Start, int End

I've tried

control.setSelection(0, t.length());
ASKER CERTIFIED SOLUTION
Avatar of ksivananth
ksivananth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That doesn't appear to have done anything

It could be a timing issue, but  not really sure.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For some reason my application simply was not allowing any of these selects to work. The application has been scrapped and onto another one now... sorry about not getting back, work has been insane.