Hi Jamie-

Does that class extend UIComponent? And are you using the Flex SWC?

- pamela

On Mon, Nov 3, 2008 at 11:47 PM, JamieJag <[EMAIL PROTECTED]> wrote:

>
> Well, I added a couple of rows to a grid, and added the grid to just
> to test if it would show up on the InfoWindow, but it didn't. Next I
> tried adding a simple textinput, and that didn't appear as well.
>
> Here's my code (it's a modification of your InfoWindowSprite (multi-
> tab version):
>
> public function InfoWindowContent(tabTitle:String)
> {
>        // Create info window frame
>        graphics.lineStyle(2, 0x000000, 1, true);
>        graphics.beginFill(bgColor);
>        graphics.drawRoundRect(rectLeft, rectTop, rectWidth, rectHeight,
> curveWidth, curveHeight);
>        graphics.moveTo(-10, -10);
>        graphics.lineTo(0, 10);
>        graphics.lineTo(10, -10);
>        graphics.moveTo(9, -10);
>        graphics.lineStyle(2, bgColor);
>        graphics.lineTo(-8, -10);
>        graphics.endFill();
>
>        // Create 'X' close rectangle
>        graphics.lineStyle(0, 0x000000);
>        graphics.beginFill(0x000000);
>        graphics.drawRect((rectLeft + rectWidth - 20), rectTop,
> xButtonWidth,
> xButtonHeight);
>        graphics.endFill();
>
>        var xTextFormat:TextFormat = new TextFormat();
>        xTextFormat.font = "Arial";
>        xTextFormat.size = 12;
>        xTextFormat.color = 0xFFFFFF;
>
>        var xText:TextField = new TextField();
>        xText.x = (rectLeft + rectWidth - 15);
>        xText.y = rectTop;
>        xText.text = "X";
>        xText.selectable = false;
>        xText.setTextFormat(xTextFormat);
>        addChild(xText);
>
>        xi = new TextInput();
>        xi.x = rectLeft + 20;
>        xi.y = rectTop + 25;
>        xi.width = 50;
>        addChild(xi);
>        trace("added a text input box");
>
>        // Create tabs
>        createTab(rectLeft + 2, rectTop + 2, tabTitle, "This is the content
> for tab 1.");
>        // Add a grid to the body
>        bodyGrid = new Grid();
>        bodyGrid.x = rectLeft + 10;
>        bodyGrid.y = rectTop + 30;
>        bodyGrid.width = rectWidth - 10;
>        bodyGrid.buttonMode = false;
>        bodyGrid.setStyle("backgroundColor", 0x869ca7);
>        // add rows to the grid
>        var tempRow:GridRow;
>        var gridItem:GridItem;
>        var temp:Text;
>        for (var i:int = 0; i < 2; ++i) // 2 is to be replaced by
> gridContent.length
>        {
>                //var currentItem:Object = gridContent.getItemIndex(i) as
> Object;
>                var currentItem:Object = {name:"ID", value: "1234"};
>                tempRow = new GridRow();
>                // fill up the row with griditems
>                gridItem = new GridItem();
>                temp = new Text();
>                temp.text = currentItem.name;
>                gridItem.addChild(temp);
>                tempRow.addChild(gridItem);
>
>                gridItem = new GridItem();
>                temp = new Text();
>                temp.text = currentItem.value;
>                gridItem.addChild(temp);
>                tempRow.addChild(gridItem);
>                bodyGrid.addChild(tempRow);
>                trace("added row to the grid");
>        }
>        addChild(bodyGrid);
>        cacheAsBitmap = true;
> }
>
> -MJ
>
> On Nov 1, 7:46 pm, "pamela (Google Employee)" <[EMAIL PROTECTED]>
> wrote:
> > Yes, that's what it means. Flex components will only work inside our Map
> > flex component, which is compiled against the special SWC for Flex.
> > - pamela
> >
> >
> >
> > On Sun, Nov 2, 2008 at 2:43 AM, JamieJag <[EMAIL PROTECTED]> wrote:
> >
> > > But Pamela, does it mean that using other Flex containers like the
> > > Grid inside a custom infowindow won't work unless I use version 1.7?
> >
> > > -MJ
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to