我在这里有这些标签并且它们没有出现......我完全调试了它们并且它们正在填充文本,但它们只是没有出现,请帮助。
<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>
它太棒了,如果我将我的标签放在网格之外它可以工作并显示,但不在网格内。
答案 0 :(得分:1)
这段代码对我来说运行得很好:
<?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导入是否与上面相同?