title: How to use checkBox widget in Google apps script?
body: <p>I am trying to figure out how to create a function that turns the color of the "productInfoButton" lime green when checked and grey when unchecked?  Could someone please help?</p>
  
  <pre><code>function doGet(e) {
    var app = UiApp.createApplication();
  
    var productInfoButton = app.createButton("Products").setId('productInfoButton');
  
    var handlerL = app.createServerClickHandler('prodCompleteHandlerL');
    var productCompleteCheckBox = app.createCheckBox().setId("productCompleteCheckBox")
    .setName("productCompleteCheckBox");
    productCompleteCheckBox.addClickHandler(handlerL);
    handlerL.addCallbackElement(productInfoButton);
  
    app.add(productInfoButton);
    app.add(productCompleteCheckBox);
  
    return app;
  }
  
  function prodCompleteHandlerL(e) {
    var app = UiApp.getActiveApplication();
    app.getElementById('productInfoButton').setStyleAttribute('background', 'lime')
    return app;
  }
  </code></pre>