Klipfolio Dashboard 5 API

Object Button

Object
   |
   +--Button

The Button object provides an API to a button component in the Customize Klip window which can be accessed by clicking on the Menu button of your Klip's title bar or by right-clicking anywhere in the Klip.

Use myTab.addButton() to add a button to a tab, where myTab is a Tab object.

Example

The following onLoad() function creates a new tab called 'New Tab' in the Customize Klip window, then adds a button called 'New Button', as shown on the right.
 function onLoad() {
 
     // Create a new tab
     var tab = Setup.addTab( "New Tab" );
 
     // Add a button to the tab
     button = tab.addButton( "New Button" );
     button.url = "http://www.klipfolio.com/";
 }
 
In the above fuction, the call to Setup.addTab( "New Tab" ) adds a new Tab object to the Klip's Setup array.

Each Tab object in the Setup array corresponds to a tab in a Klip's Customize Klip window.

Each Tab object can have multiple UI components, and each Klip can have multiple tabs. Use the Button, Checkbox, ComboBox, ListControl, Spacer, Text, TextArea, and TextField objects in a tab to enable users to configure the Klip to their preferences.

Buttons typically open a url in a new web page (as shown in the example) or cause Klipfolio Dashboard to execute a handler function defined using the onClick() property.


Properties Summary
 boolean disabled
          The enabled/disabled state of this button.
 String url
          The URL that Klipfolio Dashboard will open in the user's web browser when the button is clicked.
 String value
          The label displayed by this button.
   
Function Summary
 function onClick()
           Specifies a Handler Function for Klipfolio Dashboard to call when the user clicks the button.

Properties Detail

disabled

boolean disabled

url

String url

value

String value

Function Detail

onClick

function onClick()

Klipfolio Dashboard 5 API

© 2009 Klipfolio Inc. All Rights Reserved.