[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: [dsdp-ercp-dev] I need a MultiPageDialog with scrollable tabs
 | 
Michael, 
Thanks a lot. My MultiPageDialog is now running. 
2006/12/20, Michael MS Cheng <mscheng@xxxxxxxxxx>:
Hi, 
I have written a short sample for you
so you can understand how it works.
The shell is the top level shell.
at line 3 we record the Composite returned
by mpd.getPage(0)
line 4 we create a ScrolledComposite
and use the Composite returned from the mpd.getPage(0) as parent
line 5 to 10 we create a Composite and
30 Labels in it, layouting them out vertically
line 11, 13 we use ScrolledComposite.setContent
on the Composite.
now, if the sc happen to have a size
smaller than the content Composite, then a scrollbar will be automatically
generated for you.
1        MultiPageDialog
mpd = new
MultiPageDialog(shell, SWT.BORDER);
2        mpd.createPage("Page
one", null);
3        Composite
page = mpd.getPage(0);
4        ScrolledComposite
sc = new
ScrolledComposite(page, SWT.V_SCROLL
| SWT.BORDER);
5        Composite
contentHolder = new
Composite(sc, SWT.NONE);
6        contentHolder.setLayout(new
FillLayout(SWT.VERTICAL));
7        for(int
i = 0; i<30; i++){
8          
     new
Label (contentHolder, 0).setText("Label
"+i);
9        }
10        contentHolder.pack();
11       sc.setContent(contentHolder);
12 //      
 sc.pack();
13        sc.setSize(100,
200);
14        mpd.open();
hope this helps, please let me know
if you have any more questions.
Michael Cheng
Mail : mscheng@xxxxxxxxxx
TEL : 886-2-81706885
China Software Development  Lab
10F,Bldg E. 19-13 Shangchong Rd., NanKang Dist.,
Taipei 115,Taiwan,R.O.C
In SWT you put something in a containing widget by creating a new widget
with the containing widget as the constructor's "parent" argument.
Hi Mark, 
How can I put a ScrolledComposite inside the Composite returned by createPage()?
Class Composite haven´t a setContent() method or some like that.
Thanks
2006/12/19, Mark Rogalski <rogalski@xxxxxxxxxx
>:
MultiPageDialog does not provide automatic scroll bars, but you can put
a scrolled composite in the composite provided when creating a new dialog
page. 
Hello, 
I´m writing an application with eRCP and I need a MutiPageDialog that have
scroll funcionality. 
I think default MultiPageDialog is not scrollable, is that truth? 
In that case, how can I make a tabbed control with scroll on the tabs?
I was looking the ScrolledComposite in the ercpdemo project from the eclipse
CVS but I don´t know how can I put that ScrolledComposite inside a MultiPageDialog.
In fact, there isn´t any method from MultiPageDialog to put some Composite
inside it, and the standard way to create a new tab is: 
Composite page = multipagedialog.createPage("tabname", null);
Somebody knows how to do a MutiPageDialog with scrollable tabs? 
Thanks a lot in advance, 
Vicente Ferrer 
_______________________________________________
dsdp-ercp-dev mailing list
dsdp-ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
_______________________________________________
dsdp-ercp-dev mailing list
dsdp-ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
_______________________________________________
dsdp-ercp-dev mailing list
dsdp-ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
_______________________________________________
dsdp-ercp-dev mailing list
dsdp-ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
 
_______________________________________________
dsdp-ercp-dev mailing list
dsdp-ercp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev