Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Scrolled ListViewer problems (New User)
Scrolled ListViewer problems (New User) [message #460506] Tue, 30 August 2005 13:03 Go to next message
Eclipse UserFriend
Originally posted by: mbletzin.ncsa.uiuc.edu

Hi,

I am trying to implement the Swing function
Jlist.setVisibleRowCount() using the jface ListViewer. For some
reason ListViewer is attempting to display the entire input list. I
would like it to display only a few rows at a time with a vertical
scroll bar. I have tried several approaches the latest I have pasted
below. The variable "profiles" is a java.util.List of about 20
objects which are handled by the TagLabelProvider class. Thanks in
advance for any suggestions.

Michael

{
ScrolledComposite scroll = new
ScrolledComposite(
profileStuff,
SWT.V_SCROLL | SWT.BORDER);
scroll.setLayout(new FillLayout());
// scroll.setExpandHorizontal(true);
// scroll.setExpandVertical(true);
scroll.setMinSize(new Point(200,40));
profileListViewer = new ListViewer(
scroll, SWT.SINGLE);
profileListViewer.setLabelProvider(new
TagLabelProvider());

profileListViewer.setContentProvider(new ArrayContentProvider());
//
profileListViewer.getControl().setSize(200,40);
// scroll.setSize(200,60);
//
scroll.setContent(profileListViewer.getControl());
log.debug("Size " +
profileListViewer.getControl().getBounds());
// profileListViewer.setInput(profiles);
}
Please disregard this repeat Re: Scrolled ListViewer problems (New User) [message #460507 is a reply to message #460506] Tue, 30 August 2005 13:05 Go to previous message
Eclipse UserFriend
Originally posted by: mbletzin.ncsa.uiuc.edu

Sorry,

I'm having trouble managing this news reader app.

Michael

Michael Bletzinger <mbletzin@ncsa.uiuc.edu> wrote:

> Hi,
>
> I am trying to implement the Swing function
> Jlist.setVisibleRowCount() using the jface ListViewer. For some
> reason ListViewer is attempting to display the entire input list. I
> would like it to display only a few rows at a time with a vertical
> scroll bar. I have tried several approaches the latest I have pasted
> below. The variable "profiles" is a java.util.List of about 20
> objects which are handled by the TagLabelProvider class. Thanks in
> advance for any suggestions.
>
> Michael
>
> {
> ScrolledComposite scroll = new
> ScrolledComposite(
> profileStuff,
> SWT.V_SCROLL | SWT.BORDER);
> scroll.setLayout(new FillLayout());
> // scroll.setExpandHorizontal(true);
> // scroll.setExpandVertical(true);
> scroll.setMinSize(new Point(200,40));
> profileListViewer = new ListViewer(
> scroll, SWT.SINGLE);
> profileListViewer.setLabelProvider(new
> TagLabelProvider());
>
> profileListViewer.setContentProvider(new ArrayContentProvider());
> //
> profileListViewer.getControl().setSize(200,40);
> // scroll.setSize(200,60);
> //
> scroll.setContent(profileListViewer.getControl());
> log.debug("Size " +
> profileListViewer.getControl().getBounds());
> // profileListViewer.setInput(profiles);
> }
>
>
>
Previous Topic:Scrolled ListViewer (New User)
Next Topic:Not able to see double-byte in StyledText widget
Goto Forum:
  


Current Time: Wed Apr 21 02:56:47 GMT 2021

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

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

Back to the top