Okay, so given the following application:
<?xml version="1.0" encoding="utf-8"?>
<Application
xmlns="http://www.adobe.com/2006/mxml"
>
<Script>
<![CDATA[
private function addCategory():void
{
var gi:GridItem;
var gr:GridRow = new GridRow;
gi = new GridItem;
(gi.addChild(new Label) as Label).text = "item " + (grid.numChildren
- 3) + ":";
gr.addChild(gi);
gi = new GridItem;
(gi.addChild(new Label) as Label).text = "value";
gr.addChild(gi);
grid.addChildAt(gr, grid.numChildren - 2);
}
]]>
</Script>
<PopUpButton openAlways="true">
<popUp>
<Grid id="grid" paddingTop="4" paddingBottom="4" paddingLeft="4"
paddingRight="4"
fontSize="12" backgroundColor="0xFFFFFF" borderStyle="outset"
borderThickness="2"
>
<GridRow>
<GridItem colSpan="3">
<CheckBox label="Categorize data" fontWeight="bold"/>
</GridItem>
</GridRow>
<GridRow>
<GridItem>
<Label text="Start:"/>
</GridItem>
<GridItem>
<Label text="first row"/>
</GridItem>
</GridRow>
<GridRow id="lastRow">
<GridItem>
<Label text="End:"/>
</GridItem>
<GridItem>
<Label text="last row"/>
</GridItem>
</GridRow>
<GridRow>
<GridItem colSpan="3">
<Button label="Add Category" click="addCategory()"/>
</GridItem>
</GridRow>
</Grid>
</popUp>
</PopUpButton>
</Application>
I want to be able to click the popupButton, click the "Add Category" button,
and have the popped up window resize right then so you can see everything.
Is there a good way (or even an ok way) to do this?
--
Jason