Skip to content

Commit

Permalink
autoresize.
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-kriegel committed Feb 19, 2014
1 parent 15cec16 commit 34f06f4
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.KeyAdapter;
Expand Down Expand Up @@ -471,6 +473,19 @@ else if (e.keyCode == SWT.END) {
}

initKeyBindingContext();
sc.addControlListener(new ControlListener() {

@Override
public void controlResized(ControlEvent e) {
try {
fitHorizontal();
} catch (Exception ex) {}
}

@Override
public void controlMoved(ControlEvent e) {
}
});
}

@Override
Expand Down

0 comments on commit 34f06f4

Please sign in to comment.