Clear Up
SharpKit Reference

Tip Class

Simple plugin for using an Ext.tip.Tip with a slider to show the slider value. In general this class is not created directly, instead pass the Ext.slider.Multi.useTips and Ext.slider.Multi.tipText configuration options to the slider directly.

  
    Ext.create('Ext.slider.Single', {
            width: 214,
            minValue: 0,
            maxValue: 100,
            useTips: true,
            renderTo: Ext.getBody()
            });
            

Optionally provide your own tip text by passing tipText:

  
    Ext.create('Ext.slider.Single', {
            width: 214,
            minValue: 0,
            maxValue: 100,
            useTips: true,
            tipText: function(thumb){
            return Ext.String.format('**{0}% complete**', thumb.value);
            },
            renderTo: Ext.getBody()
            });
            

Namespace: Ext.slider

Constructors

Fields

Name Description
align Alignment configuration for the tip to the slider. See Ext.dom.Element.alignTo. Default values for alignment are provided by specifying the position config. Defaults to: null
offsets Offsets for aligning the tip to the slider. See Ext.dom.Element.alignTo. Default values for offsets are provided by specifying the position config. Defaults to: null
position Sets the position for where the tip will be displayed related to the thumb. This sets defaults for align and offsets configurations. If align or offsets configurations are specified, they will override the defaults defined by position. Defaults to: For horizontal sliders, "top", for vertical sliders, "left"

Methods

Name Description
getText(Thumb) Used to create the text that appears in the Tip's body. By default this just returns the value of the Slider Thumb that the Tip is attached to. Override to customize.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

© Copyright 2005-2011 SharpKit. All rights reserved.