Is it possible to define a component but somehow cause it to be omitted from
the enclosing component's list of children?  Essentially:

<mx:VBox>
  <mx:Label text="This is added as a child of the vbox, as normal."/>
  <mx:Label visible="false" text="This is invisible.. but is there some way
to not have it be a child of the vbox at all?"/>
</mx:VBox>

An obvious question is, "Why are you defining the component there if it's
not supposed to be a child?"

I've got a datagrid inline item renderer that always shows a (summary) piece
of information, but I want a pop-up to appear on rollover of the summary.
The problem I'm having is that the detail is (of course) added to the
container that holds the summary, which causes the datagrid cell to blow
open too big.

<mx:itemRenderer>
  <mx:Component>
    <mx:Box>
      <!-- This always shows up, which is fine and dandy -->
      <mx:MySummary data="{data}"  popUp="{detail}" />

*      <!-- It would be nice if this was never added to the parent box, so
that it's free to be used as a popup -->
      <mx:MyDetail id="detail" data="{data}"/>*
    </mx:Box>
  </mx:Component>
</mx:itemRenderer>

Defining the detail outside the itemrenderer entirely seems one way to go,
except that this would mean there's only one pop up for all of the rows of
the data grid.

Can you do this sort of thing with a nested component?

<mx:itemRenderer>
  <mx:Component>
    <mx:Box>
      <!-- This always shows up, which is fine and dandy -->
      <mx:MySummary data="{data}">
        <mx:popUp>
*          <mx:Component>
            <mx:MyDetail id="detail" data="{data}"/>
          </mx:Component>*
        </mx:popUp>
      </mx:MySummary>
    </mx:Box>
  </mx:Component>
</mx:itemRenderer>

Any tips would be appreciated!

Michael

Reply via email to