Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Scroll bars don't appear...
Scroll bars don't appear... [message #437586] Tue, 08 June 2004 13:32 Go to next message
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 32
Registered: July 2009
Member
Hi,

My "PerfectDialog extends Dialog" class has a createDialogArea() method
which adds an SWT List to the JFace dialog. When the dialog appears, if the
list has a lot of items, the dialog's window is partly off-screen and there
are no scrollbars. I tried adding scrollbars as follows (which didn't
work):

protected Control createDialogArea(Composite parent)
{
Composite composite = (Composite) super
.createDialogArea(parent);
List list = new List(composite,
SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
// I add a lot of elements here
ListViewer viewer = new ListViewer(list);
return composite;
}

Can someone explain what I need to do?

--
Alexandros Karypidis
Re: Scroll bars don't appear... [message #437603 is a reply to message #437586] Tue, 08 June 2004 18:02 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Did you set the size (or layout data height hint) for the list? It could be
a really tall list that is being clipped.

"Alexandros Karypidis" <karypid@inf.uth.nospam.gr> wrote in message
news:ca4emm$5dl$1@eclipse.org...
> Hi,
>
> My "PerfectDialog extends Dialog" class has a createDialogArea() method
> which adds an SWT List to the JFace dialog. When the dialog appears, if
the
> list has a lot of items, the dialog's window is partly off-screen and
there
> are no scrollbars. I tried adding scrollbars as follows (which didn't
> work):
>
> protected Control createDialogArea(Composite parent)
> {
> Composite composite = (Composite) super
> .createDialogArea(parent);
> List list = new List(composite,
> SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
> // I add a lot of elements here
> ListViewer viewer = new ListViewer(list);
> return composite;
> }
>
> Can someone explain what I need to do?
>
> --
> Alexandros Karypidis
>
Re: Scroll bars don't appear... [message #437722 is a reply to message #437603] Wed, 09 June 2004 15:47 Go to previous message
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 32
Registered: July 2009
Member
You were correct. Just for other people's reference, one must add a layout
to the composite of the dialog area:


Steve Northover wrote:

> Did you set the size (or layout data height hint) for the list? It could
> be a really tall list that is being clipped.
>
> "Alexandros Karypidis" <karypid@inf.uth.nospam.gr> wrote in message
> news:ca4emm$5dl$1@eclipse.org...
>> Hi,
>>
>> My "PerfectDialog extends Dialog" class has a createDialogArea() method
>> which adds an SWT List to the JFace dialog. When the dialog appears, if

--
In theory, there is no difference between theory and practice. In practice,
there is. -- Yogi Berra.

Alexandros Karypidis
UTH, Computer & Communications Eng. dept.
Previous Topic:SWT FileDialog problem
Next Topic:CheckboxCellEditor-Bug
Goto Forum:
  


Current Time: Thu Mar 28 13:48:20 GMT 2024

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

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

Back to the top