Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » sashform and form API and section
sashform and form API and section [message #458855] Sat, 23 July 2005 17:33 Go to next message
Eclipse UserFriend
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 #458856 is a reply to message #458855] Sat, 23 July 2005 19:09 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
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
>
>


Konstantin Scheglov,
Google, Inc.
Re: sashform and form API and section [message #458860 is a reply to message #458856] Sun, 24 July 2005 07:57 Go to previous message
Eclipse UserFriend
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
Previous Topic:datetime picker
Next Topic:About two versions of eclipse-SDK
Goto Forum:
  


Current Time: Tue Apr 23 13:17:07 GMT 2024

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

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

Back to the top