Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Form and View
Form and View [message #335584] Wed, 15 April 2009 11:27 Go to next message
Carmelo  is currently offline Carmelo
Messages: 224
Registered: July 2009
Senior Member
Hi all,
Hope someone can give me an hint on what to do .

I have a view and inside the createPartControl I'm displaying information
about the selected object in a different view.

Information are displayed using Form
(org.eclipse.ui.forms.widgets.ScrolledForm); the point is, I need to change
the number of displayed sections when the view gets the focus (this depends
on the type of the selected object).

What is the correct approach:
- Destroy the form and the toolkit and start on the onfocus to recreate
everything .
- Or should I use the parent composite from the CreatePartControl to do
something.

Thanks for any help.

Kar
Re: Form and View [message #335590 is a reply to message #335584] Wed, 15 April 2009 13:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: eclipse-news.rizzoweb.com

On 4/15/2009 11:27 AM, Kar wrote:
> Hi all,
> Hope someone can give me an hint on what to do .
>
> I have a view and inside the createPartControl I'm displaying
> information about the selected object in a different view.
>
> Information are displayed using Form
> (org.eclipse.ui.forms.widgets.ScrolledForm); the point is, I need to
> change the number of displayed sections when the view gets the focus
> (this depends on the type of the selected object).
>
> What is the correct approach:
> - Destroy the form and the toolkit and start on the onfocus to recreate
> everything .
> - Or should I use the parent composite from the CreatePartControl to do
> something.

You could use a org.eclipse.swt.custom.StackLayout with a composite for
each type of object, and switch the "top" composite when the selection
changes.

Hope this helps,
Eric
Re: Form and View [message #335601 is a reply to message #335590] Thu, 16 April 2009 04:48 Go to previous message
Carmelo  is currently offline Carmelo
Messages: 224
Registered: July 2009
Senior Member
That sounds better
thanks


"Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
news:gs56j6$gpd$3@build.eclipse.org...
> On 4/15/2009 11:27 AM, Kar wrote:
>> Hi all,
>> Hope someone can give me an hint on what to do .
>>
>> I have a view and inside the createPartControl I'm displaying
>> information about the selected object in a different view.
>>
>> Information are displayed using Form
>> (org.eclipse.ui.forms.widgets.ScrolledForm); the point is, I need to
>> change the number of displayed sections when the view gets the focus
>> (this depends on the type of the selected object).
>>
>> What is the correct approach:
>> - Destroy the form and the toolkit and start on the onfocus to recreate
>> everything .
>> - Or should I use the parent composite from the CreatePartControl to do
>> something.
>
> You could use a org.eclipse.swt.custom.StackLayout with a composite for
> each type of object, and switch the "top" composite when the selection
> changes.
>
> Hope this helps,
> Eric
Previous Topic:Text Editor line breaks
Next Topic:different colored highlights
Goto Forum:
  


Current Time: Sat Aug 30 12:24:01 EDT 2014

Powered by FUDForum. Page generated in 0.02418 seconds