Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Dynamically changing view controls according to selection changes

Hi,

My sincere apologies in case this is not the right mailing list for the
following problem.

What I am trying to do:
I am creating a view (a kind of property editor) that listens to selection
changes in another view (containing a list of app-specific properties).
From a selection, the property editor view extracts the type of the selected
property and calls some utility class to get a number of type-specific SWT
controls in a Composite. This Composite is created on the 'parent' Composite
passed as an argument to the view's createPartControl() method. This is so
as to display the generated controls in the view.

The problem:
So far, so good; but whenever the selection changes, generating a new set of
controls created in the same manner as above will simply ADD the new
controls to the view - so we end up with a view cluttered with 10s of sets
of controls as more are added to the parent in response to selections.


The question:
How can I remove what is currently showing in the view and add the newly
created container to it?
Having no control over the view's createPartControl(), how can we change its
initially created controls (overwriting any previous ones)?
Is this possible at all or should I take another route altogether?
What is the 'right' approach for this problem (i.e. should there really be a
kind of model for these GUI elements + a viewer that knows how to display
these controls and refresh itself in response to changes)?

Any suggestions, pointers, etc. are very much appreciated!

Thank you,

-- Bruno


______________________________________________
Bruno Wassermann 
           
Research Fellow                Tel: +44 (0)20 7679 3699 (Direct Dial)

University College London      Fax: +44 (0)20 7387 1397
Dept. of Computer Science      Email: B.Wassermann@xxxxxxxxxxxx
Gower Street
London WC1E 6BT
United Kingdom 
______________________________________________
  




Back to the top