sashform and form API and section [message #458855] |
Sat, 23 July 2005 17:33 |
Eclipse User |
|
|
|
Originally posted by: jeanmichel.courivaud.noos.fr
Hi,
I am trying to create a kind of master detail view... without success.
Basically in my createPartControl() function I do the following:
// Sample 1
tk = new FormToolkit(parent.getDisplay());
ScrolledForm form = tk.createScrolledForm(parent);
FillLayout layout = new FillLayout();
form.getBody().setLayout(layout);
SashForm sashForm = new SashForm(form.getBody(), SWT.HORIZONTAL);
Composite master = tk.createComposite(sashForm);
Composite details = tk.createComposite(sashForm);
sashForm.setWeights(new int[]{2, 1});
Which works good and create both panes.
What I would like is to add multiple "Section" in the second pane.
but doing a
Section s1 = tk.createSection(details,
Section.DESCRIPTION|Section.TWISTIE|Section.EXPANDED);
s1.setText("hello");
Does not generate any visible result.
Can someone please help me?
JM Courivaud
|
|
|
|
Re: sashform and form API and section [message #458860 is a reply to message #458856] |
Sun, 24 July 2005 07:57 |
Eclipse User |
|
|
|
Originally posted by: jeanmichel.courivaud.noos.fr
Thanks a lot :-)
It's working much better now.
(It was obviously a bit stupid mistake on my side... but I am an
eclipse/java beginner)
Thanks
JM Courivaud
"Konstantin Scheglov" <kscheglov@gmail.com> a ecrit dans le message de news:
dbu4lj$jgp$1@news.eclipse.org...
> JM Courivaud:
>
> You should set some layout for your master/details Composite's.
>
>> Hi,
>>
>> I am trying to create a kind of master detail view... without success.
>>
>> Basically in my createPartControl() function I do the following:
>>
>> // Sample 1
>> tk = new FormToolkit(parent.getDisplay());
>> ScrolledForm form = tk.createScrolledForm(parent);
>>
>> FillLayout layout = new FillLayout();
>> form.getBody().setLayout(layout);
>>
>> SashForm sashForm = new SashForm(form.getBody(), SWT.HORIZONTAL);
>>
>> Composite master = tk.createComposite(sashForm);
>> Composite details = tk.createComposite(sashForm);
>>
>> sashForm.setWeights(new int[]{2, 1});
>>
>> Which works good and create both panes.
>>
>> What I would like is to add multiple "Section" in the second pane.
>>
>> but doing a
>> Section s1 = tk.createSection(details,
>> Section.DESCRIPTION|Section.TWISTIE|Section.EXPANDED);
>> s1.setText("hello");
>>
>> Does not generate any visible result.
>>
>> Can someone please help me?
>>
>> JM Courivaud
|
|
|
Powered by
FUDForum. Page generated in 0.02884 seconds