Scrollable List [message #445270] |
Mon, 01 November 2004 11:21 |
Eclipse User |
|
|
|
Originally posted by: guru.prasad.exaltec.com
Hi,
I am having problems implementing scrollable List. Has any one experienced
same problem.
I am extending standard Dialog functionality for simple selection (as per
documentation).
here is the snippit of code
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite)super.createDialogArea(parent);
list = new List(composite,
SWT.BORDER|SWT.SINGLE|SWT.V_SCROLL|SWT.H_SCROLL);
try{
for (int i = 0; i < 100; i++) {
String listElement = "test String";
list.add(listElement);
}
}catch(CoreException ex){
}
viewer = new ListViewer(list);
return composite;
}
no scrollbars appears!
Guru Prasad
|
|
|
|
Re: Scrollable List [message #445279 is a reply to message #445277] |
Mon, 01 November 2004 15:04 |
Eclipse User |
|
|
|
Originally posted by: guru.prasad.exaltec.com
Thanks Steve,
I want to create simple dialog based list control. Unfortunately the dialog
implementation is supporting scroll feature. (I have tried all possibilities
of setting size, none worked). the work around is instard of using default
dialog initialization (createDialogArea Method) and creaging
ScrolledComposite instand of Composite. Is there any otherway sompler than
that?
Kind Regards,
Guru PRasad
"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:cm5hqk$it6$1@eclipse.org...
> Did you set the size of the list? Assuming you are using a layout, the
list
> will be resized such that no scroll bars are necessary. Check out the
width
> and height hints for layout to set the size.
>
> "Guru Prasad" <guru.prasad@exaltec.com> wrote in message
> news:cm566s$uut$1@eclipse.org...
> > Hi,
> >
> > I am having problems implementing scrollable List. Has any one
> experienced
> > same problem.
> >
> > I am extending standard Dialog functionality for simple selection (as
per
> > documentation).
> >
> > here is the snippit of code
> >
> > protected Control createDialogArea(Composite parent) {
> > Composite composite = (Composite)super.createDialogArea(parent);
> >
> > list = new List(composite,
> > SWT.BORDER|SWT.SINGLE|SWT.V_SCROLL|SWT.H_SCROLL);
> >
> > try{
> > for (int i = 0; i < 100; i++) {
> > String listElement = "test String";
> > list.add(listElement);
> > }
> >
> > }catch(CoreException ex){
> > }
> >
> > viewer = new ListViewer(list);
> >
> > return composite;
> > }
> >
> > no scrollbars appears!
> >
> > Guru Prasad
> >
> >
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03625 seconds