Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Removing focus

    I have some form fields. I would like to remove focus from a field when:
    - the enter key is pressed
    - the mouse is clicks outside a field

    How?
    wrangler1 Guest

  2. Similar Questions and Discussions

    1. Popup; show, take focus, wait for button action, give focus, hide
      Hi. I've got a popup MC for displaying a message or asking a yes/no question that has to do the following on an event: - show and take focus...
    2. focus/lost focus of custom control
      Hi new to .NET and have a question. What I want to do if have a custome control (contains a table grid of text boxes) and multiple instances...
    3. Removing the focus (dotted line around the checkbox) when...
      I have a datagrid inwhich I wanted some Roles to be able to change and postback while others would not see a change. Instead of using the...
    4. G3 Focus and USM
      Question: Will the unsharp mask always make an image appear sharper, no matter how sharp it is? I took a simple landscape photo on a bright day...
    5. Removing desktop icon from one account is removing from all accounts
      Using XP Professional. I want the Guest account to have only a few icons. The other two accounts should have many more. When I remove the icon...
  3. #2

    Default Re: Removing focus

    are you looking for this... i not done the mouse click part but the remove
    focus have been done in this example...if the answer is not satisfying you can
    be send message again.


    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    creationComplete="initApp()">
    <mx:Panel title="Details" width="100%" height="100%">

    <mx:Script>
    import mx.managers.FocusManager;

    public function initApp():void
    {
    defaultButton = MyButton;
    fname.setFocus();

    }



    public function action():void
    {
    append.text =fname.text + " " + dob.text +" " + email.text +" " +
    age.text +" " + ssn.text +" " + zip.text +" " + phone.text;
    MyButton.setFocus();



    }

    </mx:Script>






    <mx:Form width="100%" height="100%">
    <mx:FormItem label="First name">
    <mx:TextInput id="fname" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="Date of birth (dd/mm/yyyy)">
    <mx:TextInput id="dob" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="E-mail address">
    <mx:TextInput id="email" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="Age">
    <mx:TextInput id="age" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="SSN">
    <mx:TextInput id="ssn" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="Zip">
    <mx:TextInput id="zip" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="Phone">
    <mx:TextInput id="phone" width="200"/>
    </mx:FormItem>

    <mx:FormItem label="Phone">
    <mx:TextInput id="append" width="400" height="200"
    editable="false"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button id="MyButton" label="Button" click="action()"/>
    </mx:FormItem>

    </mx:Form>
    </mx:Panel>
    </mx:Application>

    RajeshBhadra Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139