1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" left="0" right="0" top="0" bottom="0" width="100%" height="100%" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
private function init():void
{
b_Add.addEventListener(MouseEvent.CLICK, addLine);
}
private function addLine(e:MouseEvent):void
{
dg_Operation.dataProvider.addItem({date:'AAA', libelle:'BBB', debit:'CCC', credit:'DDD'});
}
]]>
</mx:Script>
<mx:TabNavigator id="tn_Main" left="0" right="0" top="0" bottom="0" width="100%" height="100%">
<mx:Canvas label="Level">
</mx:Canvas>
<mx:Canvas label="Input">
<mx:VBox left="10" right="10" top="10" bottom="10" width="100%" height="100%">
<mx:HBox height="25%">
<mx:TextInput id="inp_Date"/>
<mx:TextInput id="inp_Credit"/>
<mx:TextInput id="inp_Debit"/>
<mx:TextInput id="inp_Libelle"/>
<mx:Button id="b_Add" label="Add"/>
<mx:PopUpMenuButton label="PopUpMenuButton"/>
<mx:PopUpButton label="PopUpButton"/>
</mx:HBox>
<mx:HBox height="75%">
<mx:DataGrid id="dg_Operation" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Date" dataField="date"/>
<mx:DataGridColumn headerText="Libelle" dataField="libelle"/>
<mx:DataGridColumn headerText="Debit" dataField="debit"/>
<mx:DataGridColumn headerText="Credit" dataField="credit"/>
</mx:columns>
</mx:DataGrid>
<mx:Spacer width="100"/>
<mx:DataGrid width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
</mx:HBox>
</mx:VBox>
</mx:Canvas>
</mx:TabNavigator>
</mx:Application> |
Partager