I'm creating a wizard page in eclipse using SWT libraries. So far I have succeeded in creating the page but with only one issue:- SWT composite doesn't get selected.
My wizard page contains a scrolledComposite containing multiple composites in a grid fashion. Each composite contains a browser just like a sample template. What I want is when I select a composite containing browser it should get selected and the finish button activated.
Now, my doubt is, how do I make the composite containing the browser selectable as a composite doesn't contain selectionListener. Or better still, is there a way to make a browser selectable?
Sample code would be appreciated.
I'm a noob and this is my first question on SO so please forgive me for any mistakes in question.
You probably want to use the
addFocusListener
method of the browser to listen for the control gaining (or losing) the focus. You can then enable/disable the finish button.The focus listener looks like:
Test program: