TIBCO GI + JAVASCRIPT

468 Views Asked by At

How reset label property. It means, initially we set the cursor property as @Hand Pointer, then i want to change cursor property value as reset. i should not get hand symbol while doing some other operation. it should be fully disabled.

i tried one way but its not working.

function disableCancelLbl() {
            log.info("inside disableCancelLbl");
            var lblCancel = createCustomer.getServer().getJSXByName("lbl_ctId_cancel");
            lblCancel.setEvent("", jsx3.gui.Interactive.JSXCLICK);
            lblCancel.setClassName("buttonTextStyleOff");           
            lblCancel.setCursor("default",true);
            log.info(lblCancel.getCursor());
            lblCancel.repaint(); 
            //reset(lblCancel.getCursor());
            log.info(lblCancel.getCursor()); 

}

after repainting, again its changing to hand pointer.

1

There are 1 best solutions below

0
On

Here's what I use to set/reset the cursor on a button. The setCursor methods seem to work, but the reset to default doesn't work for Chrome :-(

rsh.setWaitCursor = function(button)
  {
     button.setEnabled(jsx3.gui.Form.STATEDISABLED); button.repaint();

     // WaitCursor reset not working in Chrome !!
     // 'root' not overwriting wait cursor !
     if( !rsh.isChrome ) {

       button.setCursor("wait",true);       
     }
  }

  rsh.resetWaitCursor = function(button)
  {
     button.setEnabled(jsx3.gui.Form.STATEENABLED); button.repaint();

     // WaitCursor reset not working in Chrome !!
     if( !rsh.isChrome ) {

        button.setCursor("default",true);
     }
  }