Namespaces
Variants
Actions
Revision as of 06:45, 5 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DrY Button

Jump to: navigation, search
Article Metadata

Code Example
Article
Created: symbianyucca (16 May 2010)
Last edited: hamishwillee (05 Jul 2012)

DrY Button component is based on Guarana Button implementation, and it also takes the rounded corners approach used by the Guarana as well as implements similar functionality for the buttons as Guarana buttons do.

Following code snipped shows how it can be used:

dojo.require("dry.Button");
 
var but = new dry.Button({
label: "Rounded",
clicked: clickedHandler,
focused: focusedHandler,
unfocused: unfocusedHandler,
pressed: pressedHandler,
unpressed: unpressedHandler,
styleTweaker: styleTweaker}, 'button01');

The constructor takes 2 items, where the second one is the name fort eh div where the button is placed in. The first argument is a struct defining the button properties and callback functions:

  • label: "Rounded",
  • clicked: call back called when button is clicked,
  • focused: call back called when button is focused,
  • unfocused: call back called when button is unfocused,
  • pressed: call back called when button is pressed,
  • unpressed: call back called when button is unpressed,
  • styleTweaker: styleTweaker for handling the themes.


Examples

Go to DrY Index

53 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved