I found a similar question on SO but it is in Swing. I want the same thing in SWT.
So how can I make an ON/OFF slider in SWT?
I found a similar question on SO but it is in Swing. I want the same thing in SWT.
So how can I make an ON/OFF slider in SWT?
The opal project has a SwitchButton
which should be exactly what you are searching for. Here is a screenshot:
You can use it like this:
SwitchButton button = new SwitchButton(shell, SWT.NONE);
button.setTextForSelect("ON");
button.setTextForUnselect("OFF");