Adding border to Form : Form « Components « Flex






Adding border to Form

Adding border to Form
           


 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
            import mx.utils.ObjectProxy;
            
            private var obj:Object = {name:'Name',album:'Song',genre:'Rock'};
            
            [Bindable]
            private var proxy:ObjectProxy = new ObjectProxy( obj );
            
            private function handleClick():void
            {
                proxy.name = nameField.text;
                proxy.album = albumField.text;
                proxy.genre = genreField.text;
            }
      
    </mx:Script>
    
    <mx:Form borderStyle="solid">
        <mx:FormItem label="Name:">
            <mx:TextInput id="nameField" />
        </mx:FormItem>
        <mx:FormItem label="Album:">
            <mx:TextInput id="albumField" />
        </mx:FormItem>
        <mx:FormItem label="Genre:">
            <mx:TextInput id="genreField" />
        </mx:FormItem>
        <mx:FormItem label="Submit Changes">
            <mx:Button label="ok" click="handleClick();" />
        </mx:FormItem>
    </mx:Form>
    
    <mx:Form borderStyle="solid">
        <mx:FormItem label="Name:">
            <s:RichText text="{proxy.name}" />
        </mx:FormItem>
        <mx:FormItem label="Album:">
            <s:RichText text="{proxy.album}" />
        </mx:FormItem>
        <mx:FormItem label="Genre:">
            <s:RichText text="{proxy.genre}" />
        </mx:FormItem>
    </mx:Form>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Making use of form-related containersMaking use of form-related containers
2.Form Radio button groupForm Radio button group
3.Login form and get password back formLogin form and get password back form
4.Add submitForm() and debugMessage() functions as click event handlersAdd submitForm() and debugMessage() functions as click event handlers
5.Register the submitForm() and debugMessage() handler functions with b1's click eventRegister the submitForm() and debugMessage() handler functions with b1's click event
6.Clear form fieldsClear form fields
7.Form item labelForm item label
8.Empty form tag
9.FormHeading controlFormHeading control
10.A form for first name, last name, address, city, zip code and countryA form for first name, last name, address, city, zip code and country
11.Form Text required fieldForm Text required field
12.submit function can access the form control data directlysubmit function can access the form control data directly
13.Populating a Form control from a data modelPopulating a Form control from a data model
14.Switch form with TransitionSwitch form with Transition
15.Form control barForm control bar
16.Form field with LabelForm field with Label
17.Add the submitForm() and debugMessage() functions as handlers of the click event:Add the submitForm() and debugMessage() functions as handlers of the click event:
18.Register the submitForm() and debugMessage() handler functionsRegister the submitForm() and debugMessage() handler functions
19.Add form header to a formAdd form header to a form
20.Bind form input control to ModelBind form input control to Model
21.Form label with iconForm label with icon
22.One form two FormHeadingsOne form two FormHeadings
23.Model data and form controls
24.Password form fieldPassword form field
25.Contact Editor FormContact Editor Form
26.Travel formTravel form
27.Form with ControlBarForm with ControlBar
28.Form Multiple HeadingsForm Multiple Headings
29.defines the FormHeading controldefines the FormHeading control
30.Using Form controls to hold your form dataUsing Form controls to hold your form data
31.The submit function can access the form control data directly,The submit function can access the form control data directly,
32.Form Data Model ValueForm Data Model Value
33.A form that reads static data from a data model to obtain the value for a form fieldA form that reads static data from a data model to obtain the value for a form field
34.Adding a load event and a fault event to the form.Adding a load event and a fault event to the form.
35.Select a value for the formatString property from the drop-down listSelect a value for the formatString property from the drop-down list
36.Show individual times for the initialization and creation of each form element.Show individual times for the initialization and creation of each form element.
37.Register a single listener function, submitForm(), with two different buttonsRegister a single listener function, submitForm(), with two different buttons
38.Form ButtonForm Button
39.Form default buttonForm default button
40.The form and the buttons overlap as the application grows smaller, for example.The form and the buttons overlap as the application grows smaller, for example.
41.Form with ButtonForm with Button
42.Login ExampleLogin Example
43.Checking the box could make the user e-mail field requiredChecking the box could make the user e-mail field required