MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guia do Utilizador Página 63

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 256
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 62
The Flex programming model 63
The following example is a modification to the example in the previous section that adds an
event listener for the
click event of the Button control. An event listener is ActionScript code
that is executed in response to a user action. The event listener in this example copies the text
from the TextInput control to the TextArea control when the user selects the Button control:
<?xml version="1.0" encoding="utf-8"?>
<!-- ?xml tag must start in line 1 column 1 -->
<!-- MXML root element tag. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<!-- Flex controls exist in a container. Define a Panel container. -->
<mx:Panel title="My Application">
<!-- TextInput control for user input. -->
<mx:TextInput id="myInput" width="150" text=""/>
<!-- Output TextArea control. -->
<mx:TextArea id="myText" text="" width="150"/>
<!-- Button control that triggers the copy. -->
<mx:Button id="myButton" label="Copy Text"
click="myText.text=myInput.text;"/>
</mx:Panel>
</mx:Application>
Vista de página 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 255 256

Comentários a estes Manuais

Sem comentários