[英]Creating A dynamic grid of input areas in Flashbuilder 4.6
我正在嘗試制作一個使用Flash Builder在平方矩陣上執行操作的應用程序。 我采用了矩陣(n)的大小,但是現在,我很難確定如何生成n x n的文本輸入網格,用戶可以在其中輸入矩陣元素值
將數據組與TileLayout一起使用。
是的,就像彼得·霍爾所說的那樣。 將數據組與圖塊布局一起使用。
<s:DataGroup itemRenderer="Groups.DataGroupRenderer">
<s:layout>
<s:TileLayout horizontalGap="5" verticalGap="5" requestedRowCount="3" requestedColumnCount="3"/>
</s:layout>
<s:dataProvider>
<s:ArrayCollection>
<fx:String>1</fx:String>
<fx:String>2</fx:String>
<fx:String>3</fx:String>
<fx:String>4</fx:String>
<fx:String>5</fx:String>
<fx:String>6</fx:String>
<fx:String>7</fx:String>
<fx:String>8</fx:String>
<fx:String>9</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:DataGroup>
和渲染器:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
autoDrawBackground="true">
<s:TextInput text="{data}"/>
</s:ItemRenderer>
當然,如果您至少基本了解Flex,那么您將知道如何動態地完成所有工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.