apache-flex Adobe Flex标签未显示

b4lqfgs4  于 2022-11-01  发布在  Apache
关注(0)|答案(1)|浏览(220)

我有这些标签在这里,他们没有出现...在所有我运行调试,他们正在填充文本,但他们只是没有出现,请帮助。

<mx:VBox 
            height="1920" width="1080"
            xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:s="library://ns.adobe.com/flex/spark" xmlns:local="*" show="initModel()"
            horizontalScrollPolicy="off" verticalScrollPolicy="off">

                <mx:Grid id="floorPlansListDetail" width="1080" height="1920" horizontalScrollPolicy="off" verticalScrollPolicy="off">

                    <mx:GridRow id="floorPlansDetailRow" width="1080" height="500" backgroundColor="#691a3a">

                        <mx:GridItem height="500">

                            <mx:Label id="Name" text="This is a test." fontSize="48" height="200" color="#FFFFFF" visible="true" />

                            <mx:Label id="Series" text="This is a test." fontSize="20" color="#FFFFFF" />

                            <mx:Label id="Price" text="This is a test." fontSize="30" color="#FFFFFF" />

                            <mx:Label id="ElevationA" text="This is a test." fontSize="20" color="#FFFFFF" />

                            <mx:Label id="ElevationB" text="This is a test." fontSize="20" color="#FFFFFF" />

                            <mx:Label id="Beds" text="This is a test." fontSize="20" color="#FFFFFF" />

                            <mx:Label id="Baths" text="This is a test." fontSize="20" color="#FFFFFF" />

                        </mx:GridItem>

                    </mx:GridRow>
    </mx:Grid>
</mx:VBox>

它的sooooo奇怪,如果我把我的标签外面的网格它的工作和显示,但不是在网格内。

ttp71kqs

ttp71kqs1#

这段代码对我来说运行得很好:

<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script><![CDATA[

    ]]></fx:Script>
<mx:VBox
        height="1920" width="1080"
        xmlns:s="library://ns.adobe.com/flex/spark"
        horizontalScrollPolicy="off" verticalScrollPolicy="off">

    <mx:Grid id="floorPlansListDetail" width="1080" height="1920" horizontalScrollPolicy="off" verticalScrollPolicy="off">

        <mx:GridRow id="floorPlansDetailRow" width="1080" height="500" backgroundColor="#691a3a">

            <mx:GridItem height="500">

                <mx:Label id="Name" text="This is a test." fontSize="48" height="200" color="#FFFFFF" visible="true" />

                <mx:Label id="Series" text="This is a test." fontSize="20" color="#FFFFFF" />

                <mx:Label id="Price" text="This is a test." fontSize="30" color="#FFFFFF" />

                <mx:Label id="ElevationA" text="This is a test." fontSize="20" color="#FFFFFF" />

                <mx:Label id="ElevationB" text="This is a test." fontSize="20" color="#FFFFFF" />

                <mx:Label id="Beds" text="This is a test." fontSize="20" color="#FFFFFF" />

                <mx:Label id="Baths" text="This is a test." fontSize="20" color="#FFFFFF" />

            </mx:GridItem>

        </mx:GridRow>
    </mx:Grid>
</mx:VBox>
</s:Application>

你的mx导入和上面的一样吗?

相关问题