ScrollBar pageup, pagedown not responding [message #445337] |
Tue, 02 November 2004 22:52 |
Eclipse User |
|
|
|
Originally posted by: ngodotson.gmail.com
Hi All,
I have a ScrolledComposite which I am trying to implement the page up
and page down feature. I have added a SelectionListener to the ScrollBar
widget but the SelectionEvent object returned doesn't seem to populate the
detail field. Is this the appropriate event listener or should I listen
for key events?
final ScrollBar vScrollBar = scrollComp.getVerticalBar();
vScrollBar.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
switch (e.detail) {
case SWT.PAGE_DOWN:
System.out.println("PAGE_DOWN selected.");
break;
case SWT.PAGE_UP:
System.out.println("PAGE_UP selected.");
break;
case SWT.HOME:
System.out.println("HOME selected.");
break;
}
}
});
Also how would I get the scrolled composite to adjust based on the
scrollbar selection value?
Thanks in advance,
Son
|
|
|
Powered by
FUDForum. Page generated in 0.03088 seconds