Places

 

  • Download
  • Documentation
  • Forums
  • Demo
  • Contact
  • Blog
  • My account

Meteora

Javascript Widgets

Controls

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Filebrowser
  • Form Control
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

Features

  • JsonRpc Core

Effects

  • Visual effects

Control.Spinbutton

Before proceeding you may want to read our getting started page.

What does this control do?

This control is an input element and a pair of buttons to increment or decrease its value.

How to use

In order to use this control, paste this line of javascript right at the beginning of your script tag:

Meteora.uses('Control.Spinbutton');

You'll need to associate an input with this control.

<input id="spinbutton_input">

You may then by able to invoke the Datagrid this way:

new Spinbutton(
  // ELEMENT
  'spinbutton_input',
  {
    // OPTIONS
    'defaultValue': 0.0,
    'maxValue': 1,
    'minValue': 0,
    'step': 0.1
  }
);

Options

defaultValue: float

The value the input will display by default.

minValue: float

The lowest value.

maxValue: float

The maximum value.

step: float

Step for increasing or decreasing.

cycle: boolean

Set true is you want to cycle extreme values.

values: array

An array of values, the index of the array will be the Spinbutton's value. Useful for displaying week days.

onChange: event

Function to call when the user changes the value of the Spinbutton.

Methods

setValue(number)

Sets a value for the Spinbutton's input.

Powered by textmotion

(c) 2008 Astrata Software