Properties Methods Events Config Options Direct Link
Observable
  Component
    Component
      Container
        Container
          SegmentedButton

Class Ext.SegmentedButton

Package:Ext
Defined In:SegmentedButton.js
Class:SegmentedButton
Extends:Container

SegmentedButton is a container for a group of Ext.Buttons. Generally a SegmentedButton would be a child of a Ext.Toolbar and would be used to switch between different views.

Useful Properties

Screenshot:

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'));
        }
    }
});

Config Options

Config OptionsDefined By
 allowDepress : Boolean
Allow to depress a pressed button. (defaults to true when allowMultiple is true)
SegmentedButton
 allowMultiple : Boolean
Allow multiple pressed buttons (defaults to false).
SegmentedButton
 centered : Boolean
Center the Component. Defaults to false.
Component
 componentCls : String
CSS Class to be added to a components root level element to give distinction to it via styling.
Component
 data : Mixed
The initial set of data to apply to the tpl to update the content area of the Component.
Component
 disabled : Boolean
Defaults to false.
Component
 disabledCls : String
CSS class to add when the Component is disabled. Defaults to 'x-item-disabled'.
Component
 draggable : Boolean
Allows the component to be dragged via the touch event.
Component
 floating : Boolean
Create the Component as a floating and use absolute positioning. Defaults to false.
Component
 floatingCls : Boolean
The class that is being added to this component when its floating. (defaults to x-floating)
Component
 height : Number
The height of this component in pixels.
Component
 hidden : Boolean
Defaults to false.
Component
 monitorOrientation : Boolean
Monitor Orientation change
Component
 stopMaskTapEvent : Boolean
True to stop the event that fires when you click outside the floating component. Defalts to true.
Component
 styleHtmlCls : String
The class that is added to the content target when you set styleHtmlContent to true. Defaults to 'x-html'
Component
 width : Number
The width of this component in pixels.
Component

Public Properties

PropertyDefined By
 draggable : Boolean
Read-only property indicating whether or not the component can be dragged
Component
 items : Ext.util.MixedCollection
The MixedCollection containing all the child items of this container.
Container
 rendered : Boolean
Read-only property indicating whether or not the component has been rendered.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By