Disabled button still clickable.  Why ?

Hi,
When I disable a button : oForm.Items.Item("MyButton").Enabled = false it's still possible to click it.  Why is that ?  What is the purpose of the Enabled ?  If you tell me it's just to make it appear disabled but it's not really disabling it then I'm lost here.

Hi Marc,
You are correct. Disabling a button does not stop the click event from being fired.  You will need to check for its enabled state in your event handler. See the sample below from my code to handle a custom Details button. I have to check to make sure it's enabled before I deal with it.
David
switch (itemValue.ItemUID)
     case DETAILS_UID:
          if (itemValue.BeforeAction == false &&
          BoEventTypes.et_ITEM_PRESSED &&
          this.SboForm.Items.Item(DETAILS_UID).Enabled == true)
          // Your code here
          break;

Similar Messages

  • Disabled buttons still generate events

    It seems that disabled buttons still generate events in business one. If a button is disabled (even a standard one) click events can still be seen in the SBO event logger. I would have expected a disabled button to be completely disabled and no events to be generated whereas as it is I have to check in the event handler to see if the button is enabled or not.
    Is my understanding of this correct?
    Has anyone else had issues like this?
    Gordon Wood

    Hi Gordon,
    That sounds like an issue with the SBO Event Logger because no event is actually triggered in the addon when the button is disabled.
    Kind Regards,
    Owen

  • Disabling button still the button works !!!???

    Hi,
    I'm either disabling a button by Screen Painter or by code and yet the button is still functional however it is greyed out and seems to be disabled to me visually.
    Any ideas ?
    SAP 8.81 PL08

    Thanks so much. You are right. But I don't understand why apex does that? Because I has specified some java script in element tab of a hidde item.
    But later I noticed that element tab itself is gone.
    Changing item type broght the tab back and I could see my java script.
    But its misleading. I thought my code is gone.
    Thanks,

  • Disabled buttons still selectable problem, please help

    I have a simple GUI which takes input from the user and when it has enough information allows the user to select to run an operation (setEnabled(true) on the run button). Initially I set the run button on the GUI to be disabled using setEnabled(false). Although the button appears greyed out the mouse_clicked() event is run when you click on the button.
    Can anyone inform me what is wrong, it appears the button is disabled to look at but is still active if clicked.
    Regards,
    Mark

    Thanks, that did the trick. Thought it must be the type of Listener used as I have used setEnabled in the past without problems.

  • Button.enabled = false   (but still clickable?!)

    Hello Dear Forum,
    Got a button (imported png defined as a button in the library).
    The button is dragged onto the stage, given an instance name "btn".
    Clicking the button fires an eventListener which is doing all the right things, except...
    btn.enabled = false;
    ...only changes the cursor from a pointing finger to an arrow. What?! It is still clickable.
    My intention is to disable the button so it cannot be clicked. But it can still be clicked. Not good.
    QUESTION: How do I disable a button and prevent it from being clicked?
    Thanks for your support,
    ///johan
    REASON: I am temporarily disabling the button so that it cannot be clicked multiple times while loading other stuff. Makes sense.

    To disable the button (a homegrown SimpleButton) use its mouseEnabled property.  I think enabled only applies to Button components in AS3.

  • How to create a disabled button without javascript

    Hi,
    I have to create a disabled button in apex 4, without using javascript due to some security reasons. I have edited the button template to give a disabled look, but still an action eg. submit is associated with it. I dont want any action to be performed on this button.
    Please suggest how can i achieve this or any alternative approach.
    Regards,
    Shweta

    Shweta wrote:
    Hi,
    I have to create a disabled button in apex 4You ALWAYS need to supply the following information with the initial question:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s)/versions(s) used
    <li>Theme
    <li>Templates
    <li>Region type
    without using javascript due to some security reasons.Why? What "security reasons"?
    I have edited the button template to give a disabled look, but still an action eg. submit is associated with it. I dont want any action to be performed on this button.
    Please suggest how can i achieve this or any alternative approach.If no action can be performed on the button, why is it there? Don't render it all.

  • Enable or disable button on a ribbon based on user permissions in SharePoint 2010

    Hi,
    I have requirement to find a way to disable Inheritance, Add and Modify group from permission tab for users who are not added into specific group e.g. Administrators
    I have followed the following article to create a feature but have encountered few issues:
    http://msdn.microsoft.com/en-us/library/ff408060.aspx
    Issues:
    I used the above code as a sample to create a feature and test if it would work. It worked fine but even though i have replaced Location="Ribbon.Library.Actions.ConnectToClient" with my permission locations,
    Connect to Outlook button still doesn't appear when the feature is activated. If i deactive this feature it shows
    Connect to Outlook button even though there is no reference for this in the code!
    I have modified the Elements.XML and have added the following code but it still disables the buttons for a user who has Site Collection Administrator permissions, i just want to disable this for users who are in particular group:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
    Id="RemoveRibbonButton"
    Location="CommandUI.Ribbon"
    RequireSiteAdministrator = "TRUE"
    >
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.Permission.Modify" />
    </CommandUIDefinitions>
    </CommandUIExtension>
    </CustomAction>
    <CustomAction
    Id="RemoveRibbonButton"
    Location="CommandUI.Ribbon"
    RequireSiteAdministrator = "TRUE"
    >
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.Permission.Add" />
    </CommandUIDefinitions>
    </CommandUIExtension>
    </CustomAction>
    </Elements>
    I have also have another issue when this feature is activated even though i haven't removed 'Check' and 'Manage' Ribbon locations, they are also greyed out as shown it the screenshot below:
    I have also created a user control using the following method:
    http://sharepointroot.com/2010/06/18/remove-actions-from-the-ribbon-sharepoint-2010/
    But again i need to restrict it specific user group.
    Any advice how to do this? or which way is better creating a feature or creating a user control? even though i liked the creating the feature as it gives your more control.
    Regards,
    Kashif

    Thanks for your reply Paul.
    I do understand that this is a partial solution and wouldn't stop them completely from doing these actions using different UI but atleast it would remove these options from the ribbon which is causing us some major issues when clicked by mistake especially
    'inherit permissions'.
    We do have governance policies in place and a certain user group can add and remove users from SP site. But the issue we have currently is that when one of these (authorised) users uses 'inherit permissions from parent' site. This removes the unique
    permissions from the subsite and delete all SP groups / permission level in the subsite. In some cases subsite contains confidential information which is then exposed to all the users who have access to the parent site.
    The main button which i'm interested to disable is 'Inherit Permissions' which i believe can't be used from anyother UI apart from the ribbon.
    I just need to know if it's possible to restrict this for some users or group? even if it just removes it from the ribbon only i would be still interested to explore this implementation.
    Any help would be apperciated.
    Regards,
    Kashif

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

  • When I import an old pic, I can't use the latest version and buttons in LR, Why?

    I did import an old photo, still in RAW format, but i can't use the latest version of LR, there are some buttons missing. Why is that. I haven´t used LR that much. Only a few times. Is there something I fail to do when I import pictures?
    Thank you in advance.
    //Fredrik

    What buttons are missing?
    What operating system?
    A few details would really help.

  • Disable button in alv tree

    Hi, I'm not able to disable a button that I added in the toolbar of an alv tree. Here is a piece of my code
    Add_Button
        data: lr_functions type ref to  cl_salv_functions_tree.
        lr_functions = mr_tree->get_functions( ).
         lr_functions->add_function(
            name     = '&OPEN_ALL'
            icon     = l_icon
            text     = l_text1
            tooltip  = l_text1
            position = if_salv_c_function_position=>right_of_salv_functions ).
    Disable_Button
      try.
        lr_functions->ENABLE_FUNCTION(
          name      = '&OPEN_ALL'
          boolean   = abap_false ).
        catch cx_salv_wrong_call CX_SALV_NOT_FOUND.
      endtry.
    Enable_function does not return an exception, so it found the button. But the button still enable. What's wrong?
    Thanks, Davy

    Hi Davy,
    I'm facing same problem as you, did you resolved it?
    My coode looks like this
    data: l_function type ref to CL_SALV_FUNCTION.
    l_function->set_enable( abap_false ).
    Thanks in advance.
    Well, it seems that i solved it.
    Instead of using
    l_function->set_enable( abap_false ).
    i used
    l_function->set_visible( abap_false ).
    Edited by: Jorge Sancho Royo on Apr 2, 2008 1:46 PM

  • Download of update in Mountain Lion has disabled my Wifi.  Why

    For at least the third time, I have downloaded an update to Mountain Lion and it has disabled my wifi!  Why?  Can anyone help?

    The pop up saying there were updates to my OS (Mountain Lion) available and I chose the Update button which restarted my MacBook.  When it restarted, it would no longer connect to the Wifi.  When I went to Network Preferences, the Wifi is turned off and will not allow me to turn back on.  Additionally, the device does not recognize any networks and just continues to "search" for them. 
    This is the 3rd time this has happened to me when downloading updates to the OS!  Every other time has required support to get involved.  I am wondering how many other people this has happened to?

  • 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 generates events

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

  • How to make a button not clickable???

    i wanna make a button not clickable, once it is clicked... help me to do this
    Thanks
    Rubin

    you can either call setEnabled(false) or remove the listenerFor sake of GUI ergonomics, I'd suggest the first solution.
    If you implement the second solution, you'll have the user clicking on the button again and again and asking himself why nothing happens.

  • Trigger enable/disable button

    Does anyone know why sometimes when a trigger is created you get an "enable/disable" button and sometimes you don't?
    We are on Application Express 3.1.2.00.02

    Sue:
    Good question. I see similar behaviour with my 3.1.2.00.2 APEX installation.
    I do not know the answer. Could possible be a bug.
    Varad

Maybe you are looking for

  • Where can I download Adobe Acrobat 10 Standard

    Where do I go to D/L Adobe Acrobat X Standard?

  • PDF will not print editable text fields

    When I fill out a PDF form with editable fields, the text shows up fine on the computer screen but when I print, the text is gone. Is there a setting so solve this? using Acrobat acrobat 7.0 at work and I thing acrobat reader 8 at home. Same issue on

  • Missing class: oracle.jdevimpl.webservices.wizard.WSDLDoc

    Hi, I downloaded and installed the latest JDeveloper (11.1.1.2.0). However, there seems to be a missing component or wizard. I uninstalled and re-installed with no better results. The missing component is the "Business Tier" section where I should be

  • Packet data loss/error N70

    Hi..I had this error for nearly 2 years then stumbled on a cure ( well SO far it seems to work ). Under SETTINGS, go to CONNECTION,PACKET DATA...Under "Packet Data Conn." change the setting from WHEN NEEDED to WHEN AVAILABLE... Hope this helps

  • Disabling various Calendars on my BB Q10

     I have various clanders being shown on my Q -10. 1) Home 2) BBM 3)BBLink 4)Facebook I have disabled 'Home' calendar and Kept "BBLink' calendar ON (enabled)   as I was getting double entries on my BB (In two different colours) after syncing with my c