Clear Up
SharpKit Reference

SegmentedButton Class

Namespace: Ext

Base Types

System.Object

Constructors

Name Description
SegmentedButton(SegmentedButtonConfig)
SegmentedButton() @event toggle Fires when any child button's pressed state has changed. @param {Ext.SegmentedButton} this @param {Ext.Button[]} pressedButtons The new pressed buttons

Methods

Name Description
applyItems() We override initItems so we can check for the pressed config.
applyPressedButtons(object, object) @private
disable() Disables all buttons
doUpdatePressedButtons(object) Updates the pressed buttons. @private
enable() Enables all buttons
onButtonRelease() Button sets a timeout of 10ms to remove the {@link #pressedCls} on the release event. We don't want this to happen, so lets return false and cancel the event. @private
onButtonTap(object) Called when the button has been tapped. Checks for {@link #allowMultiple} + {@link #allowDepress} and delegates accordingly @private
updatePressedButtons(object, object) Called when the {@link #pressedButtons} config gets changed. Fires off the toggle event. @private

Properties

Name Description
extend SegmentedButton is a container for a group of {@link Ext.Button}s. Generally a SegmentedButton would be a child of a {@link Ext.Toolbar} and would be used to switch between different views. # Useful Properties: * - {@link #allowMultiple} # Example usage: * var segmentedButton = new Ext.SegmentedButton({ allowMultiple: true, items: [ { text: 'Option 1' }, { text : 'Option 2', pressed: true, handler: tappedFn }, { text: 'Option 3' } ], listeners: { toggle: function(container, button, pressed){ console.log("User toggled the '" + button.text + "' button: " + (pressed ? 'on' : 'off')); } } }); *
xtype SegmentedButton is a container for a group of {@link Ext.Button}s. Generally a SegmentedButton would be a child of a {@link Ext.Toolbar} and would be used to switch between different views. # Useful Properties: * - {@link #allowMultiple} # Example usage: * var segmentedButton = new Ext.SegmentedButton({ allowMultiple: true, items: [ { text: 'Option 1' }, { text : 'Option 2', pressed: true, handler: tappedFn }, { text: 'Option 3' } ], listeners: { toggle: function(container, button, pressed){ console.log("User toggled the '" + button.text + "' button: " + (pressed ? 'on' : 'off')); } } }); *
© Copyright 2005-2011 SharpKit. All rights reserved.