[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] ScrollBar auto scroll back

Hello Team,

I am creating a scroller using the following code

public Composite Create(final Composite baseComposite) {
final ScrolledComposite sc = new ScrolledComposite(
				baseComposite, SWT.V_SCROLL | SWT.H_SCROLL );
		sc.setAlwaysShowScrollBars(true);

		final Composite mycomposite = toolkit.createComposite(sc,
				SWT.NONE);
		
		sc.setContent(mycomposite);
		sc.setMinSize(mycomposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		
		sc.setExpandHorizontal(true);
		sc.setExpandVertical(true);
		System.out.println("imran");
		sc.getVerticalBar().setIncrement(sc.getVerticalBar().getIncrement()*5);
		
		return scomposite;
	}


My problem is , when i scroll down and then go to other window (using Alt+Tab) and then come back to my application, scroller goes back to initial position. Any idea?
Thank you