Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrollBar pageup, pagedown not responding
ScrollBar pageup, pagedown not responding [message #445337] Tue, 02 November 2004 22:52
Eclipse UserFriend
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
Previous Topic:StyledText copy problems (whereas Text copy works fine)
Next Topic:ctrl-click on a table column
Goto Forum:
  


Current Time: Wed Apr 24 22:09:16 GMT 2024

Powered by FUDForum. Page generated in 0.03088 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top