Disable Button Problems

I know I'm missing something obvious here, but I can't quite figure it out.  I've attached a simple vi that disables a button based on a checkbox.  This works fine. However, I can't stop the loop to exit the program.  Is the event structure causing this?  How do I get around this issue?
Thanks,
Derek
Attachments:
DisableButton.vi ‏15 KB

Yes, the current loop iteration cannot finish until the event structure executes, and it will only execute if a handled event occurs, of course!
Simply create another event for the stop button as in the attached modification (LAbVIEW 8.0).
Also notice that you don't need any wait statements, because the loop only spins if needed. I have placed a loop counter on the iteration terminal for demonstration.
Message Edited by altenbach on 03-01-2006 05:46 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
DisableButtonMOD.vi ‏15 KB

Similar Messages

  • Enabling/disabling buttons problem

    Hello,
    I'm using jdev 10.1.3.3.0 and I want to enable/disable buttons based on the value in a tableSelectOne. I wrote a function isNextButtonEnabled() in my backing bean and I have set the disabled option of the nextButton (=CoreCommandButton) to #{!backing_bean.nextButtonEnabled}. Then I putted the autoSubmit option of the TableSelectOne to true and made a partialTrigger on the nextButton to the TableSelectOne. In the print statements everything is fine, but it is never displayed.
    Does anyone know what to do about this.

    Well,
    the nextButton is in a cellFormat which on itself is in a HtmlRowLayout. I putted partial triggers on the cellformat, the rowLayout and the panelPage to the TableSelectOne, but this doesn't do the trick neither. Strange.

  • I have tried all the methods in previous logs btu nothing works... how do i get my facebook id to work in settings on my ipad? there is no disable button in privacy only an app on my ipad

    ok so ive tried everything except for complete reset where i lose all my data and stuff... i reset my settings and i tried the privacy then facebook and disable there is no disable button... i am fedup i cant acces any of my games because its registered to that facebook which cannot log in please give me an answer that works because its really ******* me  off...

    Your backlight is out, it's a hardware problem and you'd be best served to take it in for an estimate. Or you could purchase an external display and use it as a desktop computer. You'll have to decide if repairing a 6 year old computer is worth it.

  • Read-only textbox and/or disable buttons in Infopath 2013

    In a InfoPath 2013 custom list form, my requirement is to make textboxes read-only, disable buttons, and/or create new buttons so users can not update fields in a custom list once the user has updated data in the list. Basically after the user hits the 'save'
    button so that the data is saved.
    The requirement is not to set up custom permissions since my SharePoint administrator said I should find another option. This administrator said he does not see a reason for only an 'add' permission.
    Thus can you tell me how to meet my requirements? Can you show me screen prints, pictures, or urls on how to solve the problem?

    Hi,
    According to your description, you might want to prevent users from editing the existing items.
    There are two workarounds I can provide as below:
    As the first workaround, you can remove Ribbon from SharePoint InfoPath List Form via modifying the OOTB settings of InfoPath Web Part.
    Here is a link about more details, you can use it as a reference:
    http://the-north.com/sharepoint/post/Remove-Ribbon-from-SharePoint-InfoPath-List-Form
    As the second workaround, you can apply the CSS code below to your page, it will hide the “Edit Item” button in the Ribbon:
    <style type="text/css">
    #Ribbon\.ListItem\.Manage\.EditProperties-Large{display: none !important;}
    </style>
    About how to add JavaScript/CSS into SharePoint page:
    http://blog.cloudshare.com/2012/10/29/how-to-insert-custom-javascript-code-in-sharepoint-2013-pages-part-i/
    Best regards
    Patrick Liang
    TechNet Community Support

  • 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
    }

  • Apex generating javascript to disable button onClick

    I have navigational buttons in a region to go, for example, to the "Next" page.
    APEX is including:
    onClick="javascript:this.disabled=true;"
    as part of the "Next" buttons attributes.
    So that after the user clicks the "Next" button and goes to the next page,
    if they click the browsers Back button, the "Next" button is indeed disabled.
    The Next button is disabled in FireFox but remains enabled in IE. Thus causing
    confusion for the user using FireFox.
    So I'd like to have APEX not generate this javascript at all.
    Is there a way to turn that off? Some switch on the page/region/button that I'm
    not seeing?
    Or is this just the old browser back button problem?
    Thanks in advance.

    I have processes that make calls to packages on the back-end so I don't know if importing it into the Oracle Apex hosted environment will work.
    This may or may not help but these are the page by page steps I took in creating these buttons.
    1- Click the "Create" button icon in the "Buttons" area in the "Page Rendering" column.
    2- "Select a region for the button:" (Gave it an existing region to reside in).
    3- Choose: "Create a button in a region position"
    4- Give it a Name and a Label. Click "HTML Button". Leave the default "Submit Page and Redirect to URL".
    5- Choose a Region Position, Sequence, Alignment (under "Button Attributes" is where I assigned it a style but NOT for this button).
    6- Choose a page to branch to.
    7- Click "Create button". (no display condition chosen if you clicked the Next button).
    8- Run Page
    9- View the Source
    There it is:
    <input type="BUTTON" value="Test" onClick="javascript:this.disabled=true; doSubmit('TEST');" >
    and it also creates the Branch that redirects to the page I specified based on the buttons name (I think it uses name, still a little new to this).
    so i dunno. 8-( Just wondered if that sequence of events seems normal.

  • Disabled button does not look disabled

    In a simple FX app I created a button and set the disable property to true, for exampledeleteButton.disable = true The problem is that when I run the app the button does not look disabled. The only way I can tell if the button is enabled or disabled is by mousing over it: if I mouse over a disabled button nothing happens, if I mouse over an enabled button it flashes blue.
    Is this a bug either FX or Nimbus, or am I doing something wrong?
    Cheers, Eric

    I've found the same problem and a "bugy way"
    if in a Custom node:
    var bts: Button[];
    function setControl(b: Boolean) {
            for (bt in bts) {
                bt.disable = not b;
    postinit {
            Timeline {
                keyFrames: KeyFrame {
                    time: .2s
                    action: function(): Void {setControl(false)}
            }.playFromStart();
    public override function create(): Node {
            insert Button {
                //disable: bind not control
                text: "View"
                action: function(): Void {
                    onView(boxNumber);
            } into bts;
            insert Button {
                //disable: bind not control
                text: "Print"
                action: function(): Void {
                    onPrint(boxNumber);
            } into bts;
                            VBox {
                                layoutInfo: LayoutInfo {
                                    width: 80
                                spacing: 5
                                content: [
                                    bts
    ...Afterall it put an shinny effect on your screen, thank's javafx.control API ;-)

  • How to enable or disable buttons on an interactive ALV report

    I have two buttons on Interactive ALV report. Before displaying the ALV report, I want to enable or disable buttons on ALV depending on some conditions.I dont want to make the buttons visible or invisible. This is not an OO ALV report.
    Please suggest !!!

    Then you have to use the event set_pf_status or parameter I_CALLBACK_PF_STATUS_SET for this pass the form name.
    You have to Implement the form Routine.
    FORM PF_STATUS using status type SLIS_T_EXTAB.
    SET PF-STATUS 'STS' excluding status.
    ENDFORM.
    First create the pf-staus using SE41 or double click on the status name and create . By default you make them Disable mode.

  • How setup browser laces import Bookmarks HTML security disable button open Device Manager security warni vewing mixed

    how to alter these settings?
    1.browser laces import Bookmarks HTML?
    2.security disable button open Device Manager?
    3.security warni vewing mixed?

    We didn't get a reply from you.  I just wanted to try and follow up before I close this out. 
    I'd like to know if the issue went away, and/or if you could confirm whether it's Firefox specific or happening in all browsers.

  • Caller screen Buttons problem Z10STL100-1

    I have Z10STL100-1 after official update Z10STL100-1/10.3.1.1565 having caller screen Buttons problem these are little above not like it's on 10.2 very below position. I security wipe and restart many times still same position of buttons? See pic attached

    Hello,
    Did you check if there are no objects on that index slide that have a fading transition? You should set the transition for every object to 'No transition'. The transition can be found in the Properties dialog, tab Options.
    Lilybiri

  • Disabling button Control.

    Hi all,
    i am creating custom add-on for Landed Cost screen, in that, i am placing a button say 'get cost'..
    now if i open landed cost in Find/Display mode, i want to disable that 'get cost' button.
    Can any body explain how to disable button in Find/Disable mode?
    in short,
    how to find whether the form i.e, landed cost is in Find Mode or Add Mode..?
    I appreciate your help...
    Thanks and Regards,
    KaviPrashu

    Hi,
    Try This............
    If pVal.FormType = "992" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE And pVal.BeforeAction = False Then
                oform = sbo_application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                If oform.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
                    Dim oitm As SAPbouiCOM.Item
                    oitm = oform.Items.Item("get")
                    oitm.Enabled = False
                End If
            End If
    Thanks
    Shafi

  • Apart from the lock button problem in iphone 5 the display brightness suddenly goes blank and becomes normal after locking and unlocking the iphone. The Apple service centre in India is denying to service the iphone as it was purchase in USA even thoug it

    Apart from the lock button problem in iphone 5 the display brightness suddenly goes blank and becomes normal after locking and unlocking the iphone. The Apple service centre in India is denying to service the iphone as it was purchase in USA even though the iphone is in warranty.

    iPhones do not have an international warranty.  Warranty is valid only for the country of purchase.  This is most likely because different countries require different iPhone models.  Not reasonable to expect all countries to maintain stock for all models.

  • How to disable Buttons based on condition.

    Hi
    Need your help to disable button based on condition.
    Please refer the application:
    http://apex.oracle.com/pls/otn/f?p=34797:5:110582943383419::NO:::
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In the above application, i have 2 buttons in page 5, (Report1 and Report2)
    Where i have to disable button based on the following conditon:
    i) USER whoever has Admin value 'Y' in my table can access the button.
    for this i've written a Button Condition : Type (EXISTS)
    select 1 from apex_extra_values where rtrim(lower(empname)) like decode((select Admin from apex_extra_values
    where rtrim(lower(empname))=rtrim(lower(V('APP_USER')))),'Y',rtrim(lower(V('APP_USER'))))
    note: i have empname same as my APEx user name. with Admin access 'Y'.
    By using this code i can able to hide the button for users who has no Admin access.
    But my requirement is : i have to show the button even if the user is not Admin, but to grey out (disable the button - no action)
    I tried using javascript function:
    function disableButton(pThis)
    pThis.disabled=true;
    But either of this (exists condtion or JAvascript function) works in my case and not both.
    Any pointer on this would be highlt appreciated.
    Thanks
    Vijay

    Couple of things:
    1. I would never use v('APP_ITEM') but :APP_ITEM - it is faster and there is no need to use this function within an application
    2. The way you are doing this check is not the best approach. You should create an authorization schema and run this once per session. Whatever this authorization is returning as a result you can check using the following Function returning boolean:
    IF apex_util.public_check_authorization ('MY_AUTH') THEN RETURN TRUE; ELSE RETURN FALSE; END IF;
    See this example on authorization issues:
    http://apex.oracle.com/pls/otn/f?p=31517:148
    3. As far as disabling a button is concerned I think I explained the options. I also have an example on that here:
    http://apex.oracle.com/pls/otn/f?p=31517:143
    whereby it is not disabling but hiding a button.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Disabled button fires an event ?!   :-O

    Hi, friends!
    I've never thought about the next issue: why desabled button can fire an et_Click event?
    I havn't no idea to check that!
    I thought before that enabled=false is the method to prevent et_Click event for that item, but...
    <b>Is it a bug or feature?</b>
    I'm talking now about v6.5, what can you say about that situation on v6.7?

    It is not a bug, the SDK is simply informing you that the user clicked on something.  You can click on other disabled items such as edittexts and they will also generate the click events for you. 
    The important difference with a disabled button is that the et_ITEM_PRESSED event won't be triggered.  The et_ITEM_PRESSED event is the correct one to use to detect the user pressing a button.
    John.

  • Disabled button to look like selected button

    I have a set of toggle buttons. If I wanted to disable a button the moment it was clicked, but not have the user know that this was done, how could I set the disabled button to look like a clicked button?
    I tried using
    ImageIcon disabledIcon = (ImageIcon) button.getIcon();
    button.setDisabledIcon(disabledIcon);
    button.setDisabledSelectedIcon(disabledIcon);But this made the button look like an unclicked button. The clicked button has the exact same icon in the middle, but the rest of the button is darker.
    Any help appreciated!

    may be you want like this,
    <a id="btnLink" class="brnLink" href="javascript:Form.submit('myAction')"/>
         <img id="next" src="/images/next.gif" />
    </a>

Maybe you are looking for