Disabled Object Gets Focus

Hi
I am in the process of migrating from version 1.3 to 1.4.2
I have a screen on which I I have a button which is disabled when teh screen initializes. There are other items to which I can navigate through TAB.
If i keep pressing Tab so that the focus comes to the disabled object, then it just stays there...nothing happens in version 1.4 although version 1.3 works for a similar scene and teh control goes to teh next component on the screen
I have tried setting the focus by checking the status of teh button and have set it to the same value as being enabled or disabled.
Any help please!
Thanks
priya

If i keep pressing Tab so that the focus comes to the disabled object, then it just stays thereNever seen this behaviour.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

Similar Messages

  • Disabled Button Gets Focus in 1.4 and not in 1.3

    Hi
    I am in the process of migrating from version 1.3 to 1.4.2
    I have a screen on which I I have a button which is disabled when teh screen initializes. There are other items to which I can navigate through TAB.
    If i keep pressing Tab so that the focus comes to the disabled object, then it just stays there...nothing happens in version 1.4 although version 1.3 works for a similar scene and teh control goes to teh next component on the screen
    I have tried setting the focus by checking the status of teh button and have set it to the same value as being enabled or disabled.
    Any help please!
    Thanks
    priya

    hi
    I have tried this...but this doesnot seem to help...
    i have also set
    setRequestFocusEnabled(false)
    to disable mosue and keyboard events..but thsi doensot seem to help either...
    thanks
    priya

  • Disabled button getting focus

    My problem is that a disabled button are getting focus, which is bad when the application are operated without a mouse.
    I made this litlte demo to illustrate the problem.
    Try pressing button no.1. This will disable button no.1 and button no.2,
    but why are button no.2 getting focus afterwards?
    * NewJFrame.java
    * Created on 29. september 2005, 16:55
    import javax.swing.*;
    * @author  Peter
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
            printButtonStatus();
        private void printButtonStatus () {
            printFocus (jButton1);
            printFocus (jButton2);
            printFocus (jButton3);
            printFocus (jButton4);
         * Just debug inf.
        private void printFocus (JButton button) {
            System.out.println ("Button=<" + button.getText () + ">, Enabled=<" + button.isEnabled() + ">, Focus=<" + button.isFocusable() + ">");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            jPanel2 = new javax.swing.JPanel();
            jButton4 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jPanel1.add(jButton1);
            jButton2.setText("jButton2");
            jPanel1.add(jButton2);
            jButton3.setText("jButton3");
            jPanel1.add(jButton3);
            getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
            jButton4.setText("jButton1");
            jPanel2.add(jButton4);
            getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
            pack();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:       
            jButton1.setEnabled(false);
            jButton2.setEnabled(false);
            jButton3.setEnabled(false);
            printButtonStatus();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JButton jButton4;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        // End of variables declaration
    }

    Very courius.
    I have made a little change in your code.
    1) scenario
    Simply changing .setEnabled(false) invokation, the class works fine.
    so
    jButton2.setEnabled(false);
    jButton3.setEnabled(false);
    jButton1.setEnabled(false);
    2) scenario
    the class works fine also using your .setEnabled(false) order invokations and putting after those:
    FocusManager.getCurrentManager().focusNextComponent();
    I do not know exactly why, I suppose that is there something not properly
    syncronized in events dispaching.
    In my opinion:
    a) setEnabled(false) at last calls for setEnabled(false) of JComponent
    that fires a propertyChange event
    so:
    scenario 1)
    buttons 2 and 3 are disabled before of button1 that has the focus in
    that moment (given by a the mouse click on itself)
    When botton1.setEnabled(false) is performed buttons 2 and 3 are
    just disabled, so focus is got by button4 (that is enabled)
    scenario 2)
    button1 that has the focus (given it by the mouse click) becames
    disabled before that button2 becames disabled too.
    So, probably, when the event of PropertyChanged is fired and processed, button2.setEnabled(false) invokation has not been
    just performed and swings looks for it as a focusable component
    So, using FocusManager.getCurrentManager().focusNextComponent(),
    we force the transer focus on next focusable component.
    This is only a my suppose, looking what happens.
    Regards.
    import javax.swing.*;
    * @author Peter
    public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
    initComponents();
    private void printButtonStatus () {
    printFocus (jButton1);
    printFocus (jButton2);
    printFocus (jButton3);
    printFocus (jButton4);
    System.out.println("--------------------------------");
    * Just debug inf.
    private void printFocus (JButton button) {
    System.out.println ("Button=<" + button.getText () + ">, Enabled=<" + button.isEnabled() + ">, Focus=<" + button.hasFocus() + ">, Focusable=<" + button.isFocusable() + ">");
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jButton4 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jPanel1.add(jButton1);
    jButton2.setText("jButton2");
    jPanel1.add(jButton2);
    jButton3.setText("jButton3");
    jPanel1.add(jButton3);
    getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
    jButton4.setText("jButton1");
    jPanel2.add(jButton4);
    getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
    pack();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    // I have simply change the order
    jButton2.setEnabled(false);
    jButton3.setEnabled(false);
    jButton1.setEnabled(false);
    // with this sentence the class work with original .setEnabled order
    //FocusManager.getCurrentManager().focusNextComponent();
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    printButtonStatus();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    // End of variables declaration
    }

  • How to disable the tab focusing for a JTextField object because those ...

    Hi All,
    Here I need some help. I want to disable the tab focusing( tab index) for a JTextField objects because those objects are set as setEditable(false). Also can u tell me about how to change the tab index orders for JTextFields.
    Many thanks,
    Vijaycanaan.

    I want to disable the tab focusing( tab index) for a JTextField objectsLook through the API and find methods with the word "focus" in the method name.
    Also can u tell me about how to change the tab index orders for JTextFields."How to Use the Focus Sub System":
    http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html

  • Getting focus on JTextField?

    I made a chat with a JApplet. In my chat i have a JTextField where users can write messages. I want to have focus on this JTextfield all the time, the user should not be allowed to get focus somewhere else. How can I do that? I tried requestFocus(); but its not making any differants. I use gridbaglayout and this is how I create my JTextfield:
    beskedFelt = new JTextField(10);
    c.insets = new Insets(10,0,0,0);
    c.gridx = 1;
    c.gridy = 2;
    gridbag.setConstraints(beskedFelt, c);
    contentPane.add(beskedFelt);
    beskedFelt.setEditable(true);
    beskedFelt.addActionListener(this);
    beskedFelt.requestFocus();
    thx for your time....

    yesss it worked:
    beskedFelt = new JTextField(10);
    EventQueue.invokeLater(new Runnable() {
    public void run() {
    beskedFelt.requestFocus();
    c.insets = new Insets(10,0,0,0);
    c.gridx = 1;
    c.gridy = 2;
    gridbag.setConstraints(beskedFelt, c);
    contentPane.add(beskedFelt);
    beskedFelt.setEditable(true);
    beskedFelt.addFocusListener(this);
    beskedFelt.addActionListener(this);
    public void focusGained(java.awt.event.FocusEvent fe)
    public void focusLost(java.awt.event.FocusEvent fe)
              Object source = fe.getSource();
              if ( source == beskedFelt)
    beskedFelt.requestFocus();
    thx a lot ppl....

  • How to avoid applet getting focus ?

    When i put an applet on a html page, it takes the focus when it starts up (in all browser, IT, Firefox, Safari). I want the focus to stay at other html object - How can I avoid the applet from getting focus ?

    Hi Me too facing the same problem.Looks Like onblur event is getting fired when applet is loaded which is taking the focus to the image applet .So how do we block the onblur from getting invoked.

  • Swf Not getting focus in Opera

    Hi All
               I did embed an swf file in html.The file is working fine in all browsers except opera(all versions).
    I am facing problem that flash didn't get focus when application initially load.User has to click on page.
    Then the application works fine.
    Here is the code of the application:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <head>
            <title>Main</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <style type="text/css" media="screen">
            html, body { height:100%; background-color: #ffffff;}
            body { margin:0; padding:0}
            #flashContent, div#flashContent, object { width:950px; height:650px; margin:auto; margin-top: 50px; border: none; }
            </style>
        </head>
        <body onLoad = "getAppFocus();">
            <div id="flashContent">
                <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="950" height="650" id="Main" name="main" align="middle">
                    <param name="movie" value="main.swf" />
                    <param name="quality" value="high" />
                    <param name="bgcolor" value="#ffffff" />
                    <param name="play" value="true" />
                    <param name="loop" value="true" />
                    <param name="wmode" value="window" />
                    <param name="scale" value="showall" />
                    <param name="menu" value="true" />
                    <param name="devicefont" value="false" />
                    <param name="salign" value="" />
                    <param name="allowScriptAccess" value="sameDomain" />
                    <!--[if !IE]>-->
                    <object type="application/x-shockwave-flash" data="main.swf" width="950" height="650">
                        <param name="movie" value="main.swf" />
                        <param name="quality" value="high" />
                        <param name="bgcolor" value="#ffffff" />
                        <param name="play" value="true" />
                        <param name="loop" value="true" />
                        <param name="wmode" value="window" />
                        <param name="scale" value="showall" />
                        <param name="menu" value="true" />
                        <param name="devicefont" value="false" />
                        <param name="salign" value="" />
                        <param name="allowScriptAccess" value="sameDomain" />
                    <!--<![endif]-->
                        <a href="http://www.adobe.com/go/getflash">
                            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                        </a>
                    <!--[if !IE]>-->
                    </object>
                    <!--<![endif]-->
                </object>
            </div>
        </body>
    </html>
                Please suggest some solution for this.
    Thanks

    maybe you can use JavaScript:
    document.getElementById('Main').focus();

  • OIM and disabled objects

    when a disabled user is re-enabled in OIM , it automatically re-enables all the users disabled objects . is there any way to customize or turn off this behaviour . i would like the reneabled users to get his resource objects freshly provisioned

    Do you intend to provision multiple instances of the same resource to the user?
    What I mean is, when you disable the user, all the resources get disabled. While when you re-enable it, if you re-provision the resources, users would have 2 resources one which is disabled and other which is provisioned. We had a similar requirement and in our case we Revoked the resources when the user was disabled and users would re-request for those resources once user is re-enabled.
    Additionally, if you want multiple instances of the same resource to the user with multiple instances in the disabled state (number of times you disable the user) and one in provisioned, you need to modify the Enable User task not to e-enable anything. In the same time you need to have a custom code which raises a request to provision the user with the resource (if you have approval) or provision directly.
    Hope it helps!
    Rgds, Ajay

  • How to stop preview window from automatically getting focus when you move up/down the message list.

    Since updating (my TB was a few versions old) to 31.2, the preview window automatically gets focus when I move up/down the message list. I'm assuming this is a new "feature". Is there a way to shut this off and leave the focus on the message list so I can navigate up/down like before?

    You are referring to the 'Message Pane' which displays selected opened emails below the list of emails. It is not a 'preview'.
    When you select an email by either using mouse to click on an email in the list or using the arrow keys to select emails up and down the list, you are selecting an email to open and read. That is why it is being opened in the Message Pane so that you can read it.
    If you select an email in the list and then cllck anywhere else including in the Message Pane, then you will have moved focus away from the list and the strong highlight on email in list is reduced to paler highlight.
    When you click on an email in the list, the email becomes highlighted, at this point you can use eg: arrow keys to move up and down the list.
    If you are performing single left click on email in list and then do nothing else and the strong highlight auto changes to paler highlight.
    Check you do not have a conflict with an addon by starting Thunderbird in Safe Mode.
    Help > select 'Restart with addons disabled'

  • Looking for a way to disable the "GET" button

    I have a user who would like to only allow the progressive streaming playback in iTunes U (ie disable the get button). I haven't seen any way to do this in the docs but it's entirely likely I'm missing some simple (or not) way to do this.

    You know, say after about, oh, six, seven beers I sometimes think, "Hey, I should write a book about iTunes U." It would be called something like "Deploying iTunes U" ... it wouldn't make any money (few tech books do) ... but it would win me loads of "wuv" (remember this is the beer talking). Then, of course, the next day rolls along and I realize how much work writing a book would actually be ... and then I think, "Crapspackle! ... how many beers did I have?"
    But if I were to write that iTunes U book, Chapter 1 would be called "About iTunes U" (every tech book has to start this way ... "About XML", "About MySQL", "About TCP/IP" ... like that) ... and the last section in that chapter would be called "What iTunes U is not". The first few paragraphs in that section would read this way ...
    iTunes U is not a streaming service. Sure, content displayed in iTunes U can be double-clicked and it will play ... in effect, content does stream. But while iTunes U can be made to stream content, you should not think of it as a generalized streaming service. The model for iTunes U is the iTunes Store. Think about why the iTunes Store succeeds. Podcasters do not stream ... people have been streaming since the mid-90s ... but podcasting took the world by storm. Why? Because content wasn't tethered to a network connection ... it became as portable as the iPod. This is the model you're buying into; this is the target you're aiming for.
    Whenever faculty at my site make "But ... !!" arguments, they pretty much run along one of the following lines:
    1. When I stream, students can't redistribute my content. I have control.
    Any reasonably determined person can capture a stream and redistribute it -- it is not technically "hard" to do. If a student wants to get your content onto an iPod or a PSP, he/she can easily do so. Do not fool yourself into thinking it can't happen. Chance are, it already has.
    2. I have copyrighted material in my content -- I can't afford for students to redistribute my content. I have to "know" that only students can get access to my content.
    See response to Argument 1. In addition, I have found that many instructors have naive notions about what copyright permits and forbids (and please do not be offended if you, dear reader, are an instructor ... copyright is really complicated, it's not your fault). From a copyright standpoint, streaming is basically irrelevant (you are not "protected" if you stream).
    At my university, we have a designated copyright authority. It is her job to know what's permitted and what's not for us. In any conversation with a faculty member about whether to stream or not, I always recast the question this way: "Are you allowed to use the material in a public way at all?" In every instance, I refer the questioning faculty member to our copyright expert for clarification.
    3. I want to make sure my students are sitting at desktop computer when they view my content. A stream forces them to do so.
    Not anymore. Think about how many phones have YouTube clients. Remember that these technologies are, for the most part, being driven by what students say they need. Students want to learn asynchronously -- that is, they want to listen to a summary of your lecture while commuting to campus; they want to listen to your supplementary materials while working out. A significant part of what makes iTunes U so cool and unique is that it exploits the synergy that exists between iTunes, the iTunes Store, and iPod music players. When you try to force students to view your material as a stream, you break this synergy. If you will not provide content the way students want to get it, they'll create their own solutions (see response to Argument 1).
    It can be tough to wrap your head around, but if you provide students with what they want, they won't circumvent your efforts. In effect, you will have the greater control. It requires a Zen way of thinking. If you focus on creating great content, and letting students get access to it asynchronously, you are taking away from the the major motivation for redistributing your work without permission.

  • JTextField and JTextArea don't get focus occuasionally

    I am developing a Java Swing Applet. At edit mode, JComboBox, JCheckBox, JRadioBox, and JButton work fine, but JTextField and JTextArea can't get focus occuasionally while I click them.
    Anyone has idea?
    Thanks

    Thank you Himanshu,
    but that's not exactly what my issue is. This link describes the undesired effect of ending up outisde of the player window and in the browser.
    My problem is kind of the opposite. When I launch the page in the html file I cannot use the tab key to get to any of the controls in the captivate window. I'm stuck in the browser unless I click on the captivate window. That is not acceptable if we want it accessible without using a mouse. I found a way to make it work for chrome like I stated above, but not in FF. Do you have any ideas for this?
    Thanks!
    Monique

  • Avoid window getting focus after pressing a mouse button on it

    I want that a window does not get focus although I press a mouse button on it, in Windows XP.
    I have search in Microsoft help and this fact is controlled by the Operating System itself. The notification that is sent after the user presses a mouse button is WM_MOUSEACTIVATE notification. The return value of this notification indicates the behaviour of the window after the mouse down, existing 4 options: MA_ACTIVATE, MA_ACTIVATEANDEAT; MA_NOACTIVATE & MA_NOACTIVATEANDEAT. The default is the first one, but I want to change the behaviour of the window to be the the third one: MA_NOACTIVATE, that does not activate the window, and does not discard the mouse message. The function that performs this is DefWindowProc according to the MSDN Help content.
    Any help about doing this in Labview? Is there any special function in Labview that allows setting this behaviour to a window or should I use a Windows dll? In that case how can be programmed? Has anyone done it before? I'm working with Labview 8.6.1, and I haven't found anything about this. Any help will be very useful.
    Thank you very much in advance.
    David Fernández

    It is the front panel window of a VI which I don't want to get focus. I have tried to achive this with property nodes, but the problem I think that cannot be solved in this way, because is the Operative System that gives the focus to the window when pressing a mouse button before Labview does anything. You can release the focus once the window have taken it with the Front Panel window focus property node, but what I really want is to keep the focus on the old window.
    My idea is that the VI act as a background of my application, so never can be over the rest of the windows. Some of them are floating but others are standard and I don't want to use modal windows, so I cannot solve this with the Window Appearance options.
    I have also tried to discard the mouse down in the Mouse Down? event, but I doesn't work, the window continues getting the focus although does not carry on any action.
    Any suggestion?
    Thank you for your interest
    David F

  • Text box should get focus

    Hi,
              In my jsp page I have a form witho two text fields i.e input type="text"
              These two text fields get the values from scanning. Since scanning
              generates an event enter(it is going to submit the form), so after I scan
              the first value to the first text box, the second text box should get focus
              and after the ticket is scanned to the 2nd text box it should submit the
              form and the focus should return to the
              2nd text box and not the first one.
              Thanks
              Madhu
              

    I got it working
              Thanks
              Madhu
              m holur <[email protected]> wrote in message
              news:3c1f42c7$[email protected]..
              > Hi,
              >
              > It needs a java script, I am having onsumbit focus should be on the
              second
              > text box, but it is not working. I need to know what java script I should
              > use?
              >
              > Thanks
              > Madhu
              > Nils Winkler <[email protected]> wrote in message
              > news:[email protected]..
              > > This sounds like you need to use JavaScript...
              > >
              > > Nils
              > >
              > > m holur wrote:
              > > >
              > > > Hi,
              > > >
              > > > In my jsp page I have a form witho two text fields i.e input
              > type="text"
              > > > These two text fields get the values from scanning. Since scanning
              > > > generates an event enter(it is going to submit the form), so after I
              > scan
              > > > the first value to the first text box, the second text box should get
              > focus
              > > > and after the ticket is scanned to the 2nd text box it should submit
              the
              > > > form and the focus should return to the
              > > > 2nd text box and not the first one.
              > > >
              > > > Thanks
              > > > Madhu
              > >
              > > --
              > > ============================
              > > [email protected]
              >
              >
              

  • Custom TextInput itemEditor not getting focus.

    I have an AdvancedDataGrid that has a custom itemEditor on an amounts field. If I do an inline textInput itemEditor everything works fine, but if I separate out the textInput itemEditor into it's own component then when I click on the amounts column it doesn't seem to get focus. What happens is I click once and it appears like the text box has appeared, but there is not cursor, so I can't start typing my amount. I need to click a second time in the cell for the cursor to appear.
    Here are my datagrid columns:
    <datagrids:columns>
            <mx:AdvancedDataGridColumn dataField="Customer" headerText="Cust" editable="false"/>
            <mx:AdvancedDataGridColumn dataField="Balance" headerText="Bal" editable="false"/>
            <mx:AdvancedDataGridColumn dataField="paymentAmountString" headerText="Amount"
                               editable="true" textAlign="right"
                               editorDataField="amountText" itemEditor="com.ihcfs.flex.renderers.AdvancedAmountTextInputRenderer">
            </mx:AdvancedDataGridColumn>
        </datagrids:columns>
    Here is my custom renderer/editor, I've tried both a spark TextInput and an mx:TextInput. They both have the same behavior.
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                      xmlns:mx="library://ns.adobe.com/flex/mx"
                                      focusEnabled="true">
        <fx:Script>
            <![CDATA[
                public var amountText:String;
            ]]>
        </fx:Script>
        <s:TextInput id="amountTextInput"
                     width="100%" height="100%"
                     textAlign="right"
                     change="amountText = amountTextInput.text;"
                     focusEnabled="true"
                     editable="true"
                     restrict="[0-9][.]"/>
    </s:MXAdvancedDataGridItemRenderer>
    If I do an inline item editor it works just fine, it's when I move it out to a reusable component that this behavior happens.
    Inline:
    <datagrids:columns>
            <mx:DataGridColumn dataField="customer" headerText="Cust"
                               editable="false" textAlign="center"/>
            <mx:DataGridColumn dataField="balance" headerText="Bal"
                               editable="false" textAlign="center"/>
            <mx:DataGridColumn dataField="paymentAmountString" headerText="Amount"
                               editable="true" editorDataField="text" textAlign="right">
                <mx:itemEditor>
                    <fx:Component>
                        <mx:TextInput width="100%" height="100%" textAlign="right"
                                      focusOut="textinput1_focusOutHandler(event)"
                                      focusIn="textinput1_focusInHandler(event)">
                            <fx:Script>
                                <![CDATA[
                                    import mx.controls.Alert;
                                    import mx.controls.Text;
                                    import mx.events.FlexEvent;
                                    import mx.formatters.CurrencyFormatter;
                                    [Bindable]
                                    private var originalAmount:Number;
                                    private var amountFormatter:CurrencyFormatter = new CurrencyFormatter();
                                    protected function textinput1_focusOutHandler(event:FocusEvent):void
                                        var e:TextEvent = new TextEvent("amountEntered", true);
                                        var textField:TextField = event.target as TextField;
                                        var newAmount:Number = 0;
                                        if(!isNaN(parseFloat(textField.text))){
                                            newAmount = parseFloat(textField.text);
                                        e.text = new String((newAmount - originalAmount) + "");
                                        dispatchEvent(e);
                                    protected function textinput1_focusInHandler(event:FocusEvent):void
                                        var textfield:TextField = event.target as TextField;
                                        if(!isNaN(parseFloat(textfield.text))){
                                            originalAmount = parseFloat(textfield.text);
                                        } else {
                                            originalAmount = 0;
                                ]]>
                            </fx:Script>
                        </mx:TextInput>
                    </fx:Component>
                </mx:itemEditor>
            </mx:DataGridColumn>
        </datagrids:columns>
    Thanks for the help!

    I attempted to do as you said using the following code:
    override public function setFocus():void{
         stage.focus = amountTextInput;
         amountTextInput.setFocus();
    I also tried adding an event handler to my renderer to capture the focus in event and try the same thing:
    <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                      xmlns:mx="library://ns.adobe.com/flex/mx"
                                      focusEnabled="true"
                                      focusIn="mxadvanceddatagriditemrenderer1_focusInHandler(event)">
    protected function mxadvanceddatagriditemrenderer1_focusInHandler(event:FocusEvent):void
         amountTextInput.setFocus();
    Neither of these solutions work. I could just go back to using the inline code, but I'd prefer to not copy and paste that code into several different grids.
    Thanks again for the help.

  • Grey scale objects get lighter when Outer Glow assigned to text

    I have a grey scale object on one layer and text on another. When I apply an Outer Glow to the text, the grey scale object gets 10% lighter. If I have a 2 page spread and apply an Outer Glow to text on one page, the grey scale objects on both pages get lighter. Is there some way to prevent this or at least an explanation as to why?

    Your transparency blend space (probably working cmyk) is different than the grayscale space of the image. Your grayscale image profile is "dot gain 10".
    Take a look at
    Adobe's guide to transparency.
    J

Maybe you are looking for

  • How do I get rid of the underline in text - tried   style decoration:none

    I am trying to get rid of the underline on some text which is not a link. I have tried putting style decoration: none in various places and I still can't get rid of it. Any ideas? Here's my HTML <!doctype html> <div id="businesscircleportfolio">   <h

  • My iPad screen is black but the iPad itself still works. I reset the iPad but it still doesn't work. What can i do?

    When i went onto my iPad this morning it was completely fine and working but once i took it to college with me the battery had ran out, so later on tonight i plugged my charger in and left it charging for about half an hour, when i went to go back up

  • Multiple number range for planned order

    Hi, I want maintain different number range for MRP related planned order and manual creation planned orders. I have checked OPPQ and OMI2 transaction but i could not get any clue to create different number range for same plant. Let me know is how we

  • Movie Improvement Suggestion

    I use iTunes alot, in fact I use iTunes as my default movie player as it allows me to display the DVD cover. However, (I'm not sure that the iTunes support guys read this but...) I would like to recommend a change. Currently when using iTunes for mov

  • Equium A300D laptop completly shutsdown at random times

    Equium A300D laptop completly shutsdown at random times It could be overheating. It really cant cope when trying to restore i-phone - i have been unable to do this as the laptop doesn't stay on long enough Playing and / or burning various media is al