I want to display a 20x20 grid of integer开发者_StackOverflow中文版 numbers in an AIR application. I am new to ActionScript and AIR, so I am not sure how I could go about doing this.
Because this isn't possible in a comment here a code example to elaborate it a little bit more:
Here is an example:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       creationComplete="init(event)">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.events.FlexEvent;
        [Bindable]
        private var ints:ArrayCollection;
        protected function init(event:FlexEvent):void{
            ints = new ArrayCollection();
            for(var i:int = 0; i<199; i++){
                ints.addItem(Math.round(Math.random()*10));
            }
        }
    ]]>
</fx:Script>
<s:DataGroup width="100%" height="100%"
             dataProvider="{ints}"
             itemRenderer="spark.skins.spark.DefaultItemRenderer">
    <s:layout>
        <s:TileLayout
            requestedColumnCount="20"
            requestedRowCount="20" />
    </s:layout>
</s:DataGroup>
If you use Flex you could for example use a group with a tile layout. With following attributes:
requestedColumnCount="20"
requestedRowCount="20"
You could place the 400 integers as Label or use a DataGroup with this layout...
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论