Scroll bars don't appear... [message #437586] |
Tue, 08 June 2004 09:32  |
Eclipse User |
|
|
|
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 11:47  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.09604 seconds