User_86
User_86

Reputation: 275

Tabbing order in eclipse form base editor plugin

i am working on Form based plugin editor in eclipse. my form contains 3 Text fields and one table viewer and 4 button in the same order.

i want to add support through keyboard "Tab" button. Order of tabbing is ok when user moves from 1 Text field to 2nd and next. But when user moves to/from Table viewer, tab button doesn't work as expected.

But til now i didn't write any code to handle Tab ordering, Can any one tell me how am i implement this behavior for my form.

Thanks in Advance..

Upvotes: 0

Views: 903

Answers (1)

sambi reddy
sambi reddy

Reputation: 3085

Look at the below method on Composite

    public void setTabList (Control [] tabList)

ex: 
   Composite comp = new Composite(parent,SWT.NONE);
   comp.setLayout(new GridLayout(4,false));
   Button b1 = new Button(comp,SWT.NONE);
   b1.setText("button1");
   Button b2 = new Button(comp,SWT.NONE);
   b2.setText("button2");
   Button b3 = new Button(comp,SWT.NONE);
   b3.setText("button3");
   Button b4 = new Button(comp,SWT.NONE);
   b4.setText("button4");
   comp.setTabList(new Control[]{b1,b3,b4,b2});

Upvotes: 3

Related Questions