Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
wrangler1 #1
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
-
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... -
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... -
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... -
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... -
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... -
RajeshBhadra #2
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



Reply With Quote

