As all panels are independent from each other, you'd need to register 
for each panel's "changeValue" event. In case of a panel open, you need 
to identify the panel, identify the associated widget in the stack (e.g. 
by using userData with each panel), and then use the stack's 
.setSelection() method to raise the corresponding widget.

But I would probably re-think using CollapsablePanel, as the stack has a 
single selected item, whereas a group of CollapsablePanel's does not 
support the idea of a single selection. What if a user opens three 
different panels in a row, then closes the last again. What would that 
mean for the stack? Or if no panel is open, which stack item would be 
selected? Would you maintain an internal list of recently opened panels, 
and a default stack item in case the list is empty?

T.

On 02/21/2011 02:48 PM, Michael Polak wrote:
> Sure.  Here is the idea:
>
> qx.Class.define("michael.sample",
> {
>    extend : qx.application.Standalone,
>
>    members :
>    {
>      main: function()
>      {
>      this.base(arguments);
>
>      var mainsplit = new qx.ui.splitpane.Pane("horizontal");
>
>        var vbox = new qx.ui.container.Composite(new qx.ui.layout.VBox());
>
>        var button = new qx.ui.form.Button("A");
>        vbox.add(button);
>        button = new qx.ui.form.Button("B");
>        vbox.add(button);
>        button = new qx.ui.form.Button("C");
>        vbox.add(button);
>        button = new qx.ui.form.Button("D");
>        vbox.add(button);
>
>        mainsplit.add(vbox, 0);
>
>        var stack = new qx.ui.container.Stack(new qx.ui.layout.Grow);
>
>        var colors = [ "red", "gray", "blue", "orange", "teal", "yellow",
> "green" ];
>        var widget;
>
>        for (var i=0; i<colors.length; i++)
>        {
>          widget = new qx.ui.core.Widget;
>          widget.setBackgroundColor(colors[i]);
>
>          stack.add(widget);
>        }
>
>        mainsplit.add(stack, 1);
>
>        this.getRoot().add(mainsplit, {edge:0});
>      }
>    }
> });
>
> The buttons would actually be a separate widget that has a collapsable
> panels instead of a button.  Each time I expand a panel I would like to
> change the widget in the stack.
>
> On Mon, Feb 21, 2011 at 2:44 AM, thron7 <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Can you create a Playground example that illustrates what you want to
>     achieve?!
>
>     T.
>
>     On 02/21/2011 06:10 AM, michael_polak wrote:
>      >
>      > Hi all,
>      > I'm new to qooxdoo and I'm trying to figure out how to do the
>     following:
>      >
>      > I have a bunch of panels (using a radio group) and would like to
>     change the
>      > displayed widget in a stack container according to the panel that
>     has the
>      > focus.
>      >
>      > I'm open to ideas as to how to do this.
>      > Thanks.
>
>     
> ------------------------------------------------------------------------------
>     The ultimate all-in-one performance toolkit: Intel(R) Parallel
>     Studio XE:
>     Pinpoint memory and threading errors before they happen.
>     Find and fix more than 250 security defects in the development cycle.
>     Locate bottlenecks in serial and parallel code that limit performance.
>     http://p.sf.net/sfu/intel-dev2devfeb
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to