MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guide de l'utilisateur Page 65

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 256
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 64
The Flex programming model 65
Using data binding
Flex provides simple syntax for binding the properties of components to each other, or to a
data model. In the following example, the value inside the curly braces ({ }) binds the
text
property of the TextArea control to the
text property of a TextInput control. As the user
enters text into the TextInput control, it is automatically copied to the TextArea control, as
the following example shows:
<?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="{myInput.text}" width="150"/>
</mx:Panel>
</mx:Application>
For more information, see Chapter 38, “Binding Data,” in Flex 2 Developer’s Guide.
Controlling application appearance
Flex defines a default appearance that you can use as is in an application, or modify to define
your own specific appearance. As part of modifying the appearance, you can change some or
all of the following:
Sizes Height and width of a component or application. All components have a default size.
You can use the default size, specify your own size, or let Flex resize a component as part of
laying out your application.
Styles Set of characteristics, such as font, font size, text alignment, and color. These are the
same styles as defined and used with Cascading Style Sheets (CSS).
Skins Symbols that control a component’s appearance. Skinning is the process of changing
the appearance of a component by modifying or replacing its visual elements. These elements
can be made up of images, SWF files, or class files that contain drawing API methods.
Behaviors Visible or audible changes to a Flex component that an application or user
action triggers. Examples of behaviors are moving or resizing a component based on a mouse
click.
Vue de la page 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 255 256

Commentaires sur ces manuels

Pas de commentaire