- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages: default System System.Caching System.Collections System.Data System.Data.ActiveRecord System.Data.ActiveRecord.Relations System.Data.ActiveRecord.Scaffold System.Data.ActiveReecord.Scaffold.InputBuilder System.Data.Commom.Sqlite System.Data.Common System.Data.Common.Mssql System.Data.Common.Mysql System.Data.Common.Oracle System.Data.Common.Pgsql System.Data.Common.Sqlite System.Data.DataGateway System.Data.SqlMap System.Data.SqlMap.Configuration System.Data.SqlMap.Statements System.Exceptions System.I18N System.IO System.Security System.Util System.Web System.Web.Services System.Web.UI System.Web.UI.ActiveControls System.Web.UI.WebControls System.Web.UI.WebControls.assets System.Xml Classes: IDataSource IItemDataRenderer IRepeatInfoUser TActiveFileUpload TBaseDataList TBaseValidator TBoundColumn TBulletedList TBulletedListDisplayMode TBulletedListEventParameter TBulletStyle TButton TButtonColumn TButtonColumnType TButtonType TCaptcha TCaptchaValidator TCheckBox TCheckBoxColumn TCheckBoxList TCircleHotSpot TClientScript TClientScriptLoader TClientSideValidationSummaryOptions TColorPicker TColorPickerClientSide TColorPickerMode TCompareValidator TCompleteWizardStep TConditional TContent TContentDirection TContentPlaceHolder TCustomValidator TDataBoundControl TDataGrid TDataGridColumn TDataGridColumnCollection TDataGridCommandEventParameter TDataGridItem TDataGridItemCollection TDataGridItemEventParameter TDataGridItemRenderer TDataGridPageChangedEventParameter TDataGridPager TDataGridPagerButtonType TDataGridPagerEventParameter TDataGridPagerMode TDataGridPagerPosition TDataGridPagerStyle TDataGridSortCommandEventParameter TDataList TDataListCommandEventParameter TDataListItem TDataListItemCollection TDataListItemEventParameter TDataListItemRenderer TDataRenderer TDataSourceControl TDataSourceSelectParameters TDataSourceView TDataTypeValidator TDatePicker TDatePickerClientScript TDatePickerInputMode TDatePickerMode TDatePickerPositionMode TDisplayStyle TDraggable TDropContainer TDropDownList TDropDownListColumn TEditCommandColumn TEmailAddressValidator TExpression TFileUpload TFont THiddenField THorizontalAlign THotSpot THotSpotCollection THotSpotMode THtmlArea THtmlElement THyperLink THyperLinkColumn TImage TImageButton TImageClickEventParameter TImageMap TImageMapEventParameter TInlineFrame TInlineFrameAlign TInlineFrameScrollBars TItemDataRenderer TJavascriptLogger TKeyboard TLabel TLinkButton TListBox TListControl TListControlValidator TListItem TListItemCollection TListItemType TListSelectionMode TLiteral TLiteralColumn TMarkdown TMetaTag TMetaTagCollection TMultiView TOutputCache TOutputCacheCalculateKeyEventParameter TOutputCacheCheckDependencyEventParameter TPager TPagerButtonType TPagerMode TPagerPageChangedEventParameter TPanel TPanelStyle TPlaceHolder TPolygonHotSpot TRadioButton TRadioButtonList TRangeValidationDataType TRangeValidator TRatingList TReadOnlyDataSource TReadOnlyDataSourceView TRectangleHotSpot TRegularExpressionValidator TRepeatDirection TRepeater TRepeaterCommandEventParameter TRepeaterItem TRepeaterItemCollection TRepeaterItemEventParameter TRepeaterItemRenderer TRepeatInfo TRepeatLayout TRequiredFieldValidator TSafeHtml TScrollBars TServerValidateEventParameter TSlider TSliderClientScript TSliderDirection TStatements TStyle TStyleSheet TTable TTableCaptionAlign TTableCell TTableCellCollection TTableFooterRow TTableGridLines TTableHeaderCell TTableHeaderRow TTableHeaderScope TTableItemStyle TTableRow TTableRowCollection TTableRowSection TTableStyle TTabPanel TTabView TTabViewCollection TTemplateColumn TTemplatedWizardStep TTextAlign TTextBox TTextBoxAutoCompleteType TTextBoxMode TTextHighlighter TTextHighlighterLineNumberStyle TValidationCompareOperator TValidationDataType TValidationSummary TValidationSummaryDisplayMode TValidationSummaryDisplayStyle TValidatorClientSide TValidatorDisplayStyle TVerticalAlign TView TViewCollection TWebControl TWebControlAdapter TWizard TWizardFinishNavigationTemplate TWizardNavigationButtonStyle TWizardNavigationButtonType TWizardNavigationContainer TWizardNavigationEventParameter TWizardNavigationTemplate TWizardSideBarListItemTemplate TWizardSideBarTemplate TWizardStartNavigationTemplate TWizardStep TWizardStepCollection TWizardStepNavigationTemplate TWizardStepType TXmlTransform |
Keyword
# Class TSlider
    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TSlider
TSlider class TSlider displays a slider for numeric input purpose. A slider consists of a 'track', which define the range of possible value, and a 'handle' which can slide on the track, to select a value in the range. The track can be either Horizontal or Vertical, depending of the SetDirection property. By default, it's horizontal. The range boundaries are defined by SetMinValue and SetMaxValue properties. The default range is from 0 to 100. The SetStepSize property can be used to define the step between 2 values inside the range. Notice that this step will be recomputed if there is more than 200 values between the range boundaries. You can also provide the allowed values by setting the SetValues array. A 'Progress Indicator' can be displayed within the track with the SetProgressIndicator property. The TSlider control can be easily customized using CssClasses. You can provide your own css file, using the SetCssUrl property. The css class for TSlider can be set by the CssClass property. Default value is "Slider HorizontalSlider" for an horizontal slider, and "Slider VerticalSlider" for a vertical one. If SetAutoPostBack property is true, postback is sent as soon as the value changed. TSlider raises the onValueChanged event when the value of the slider has changed during postback. You can also attach ClientSide javascript events handler to the slider : ClientSide.onSlide is called when the handle is slided on the track. You can get the current value in the value javascript variable. You can use this event to update on client side a label with the current value ClientSide.onChange is called when the slider value has changed (at the end of a move). Since: 3.1.1 Author: Christophe Boulain <Christophe.Boulain@gmail.com>
Constants Inherited From TControl
AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID,
Method Summary
protected void | addAttributesToRender ( THtmlWriter $writer) Add the specified css classes to the track
protected TSliderClientScript | createClientScript ()
boolean | getAutoPostBack ()
protected string | getClientClassName () Gets the name of the javascript class responsible for performing postback for this control.
TSliderClientScript | getClientSide () Gets the TSliderClientScript to set the TSlider event handlers.
string | getCssUrl ()
string | getData () Returns the value of the TSlider control.
boolean | getDataChanged () Returns a value indicating whether postback has caused the control data change.
TSliderDirection | getDirection ()
float | getMaxValue ()
float | getMinValue ()
boolean | getProgressIndicator ()
protected array | getSliderOptions () Get javascript sliderr options.
float | getStepSize ()
string | getTagName ()
float | getValue ()
array | getValues ()
boolean | loadPostData ( string $key, array $values) Loads user input data.
void | onPreRender ( mixed $param) Registers CSS and JS.
void | onValueChanged ( TEventParameter $param) Raises OnValueChanged event.
void | raisePostDataChangedEvent () Raises postdata changed event.
protected void | registerSliderClientScript () Registers the javascript code to initialize the slider.
protected void | registerStyleSheet () Registers the CSS relevant to the TSlider.
void | renderContents ( mixed $writer) Render the body content
void | setAutoPostBack ( boolean $value) Sets the value indicating if postback automatically.
void | setCssUrl ( string $value)
void | setData ( string $value) Sets the value of the TSlider control.
void | setDirection ( TSliderDirection $value)
void | setMaxValue ( float $value)
void | setMinValue ( float $value)
void | setProgressIndicator ( boolean $value)
void | setStepSize ( float $value) Sets the step size used to determine the places where the slider handle can stop at.
void | setValue ( float $value)
void | setValues ( array $value) Sets the possible values that the slider can take.
Methods Inherited From TWebControl
TWebControl::addAttributesToRender(), TWebControl::clearStyle(), TWebControl::copyBaseAttributes(), TWebControl::createStyle(), TWebControl::getAccessKey(), TWebControl::getBackColor(), TWebControl::getBorderColor(), TWebControl::getBorderStyle(), TWebControl::getBorderWidth(), TWebControl::getCssClass(), TWebControl::getDisplay(), TWebControl::getFont(), TWebControl::getForeColor(), TWebControl::getHasStyle(), TWebControl::getHeight(), TWebControl::getStyle(), TWebControl::getTabIndex(), TWebControl::getTagName(), TWebControl::getToolTip(), TWebControl::getWidth(), TWebControl::render(), TWebControl::renderBeginTag(), TWebControl::renderContents(), TWebControl::renderEndTag(), TWebControl::setAccessKey(), TWebControl::setBackColor(), TWebControl::setBorderColor(), TWebControl::setBorderStyle(), TWebControl::setBorderWidth(), TWebControl::setCssClass(), TWebControl::setDisplay(), TWebControl::setForeColor(), TWebControl::setHeight(), TWebControl::setStyle(), TWebControl::setTabIndex(), TWebControl::setToolTip(), TWebControl::setWidth()
Methods Inherited From TControl
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
Constant Summary
int | MAX_STEPS |
Method Details
## addAttributesToRender
protected void addAttributesToRender | (THtmlWriter $writer )
Add the specified css classes to the track
Input
THtmlWriter | $writer | writer
Output
Exception
## createClientScript
protected TSliderClientScript createClientScript | ()
Output
TSliderClientScript | javascript event options.
Exception
## getAutoPostBack
public boolean getAutoPostBack | ()
Output
boolean | a value indicating whether an automatic postback to the server will occur whenever the user modifies the slider value. Defaults to false.
Exception
## getClientClassName
protected string getClientClassName | ()
Gets the name of the javascript class responsible for performing postback for this control. This method overrides the parent implementation.
Output
string | the javascript class name
Exception
## getClientSide
public TSliderClientScript getClientSide | ()
Gets the TSliderClientScript to set the TSlider event handlers. The slider on the client-side supports the following events. <tt>OnSliderMove</tt> -- raised when the slider is moved. <tt>OnSliderChanged</tt> -- raised when the slider value is changed You can attach custom javascript code to each of these events
Output
TSliderClientScript | javascript validator event options.
Exception
## getCssUrl
public string getCssUrl | ()
Output
string | URL for the CSS file including all relevant CSS class definitions. Defaults to '' (a default CSS file will be applied in this case.)
Exception
## getData
public string getData | ()
Returns the value of the TSlider control. This method is required by IDataRenderer. It is the same as getValue().
Output
string | the value of the TSlider control.
Exception
## getDataChanged
public boolean getDataChanged | ()
Returns a value indicating whether postback has caused the control data change. This method is required by the IPostBackDataHandler interface.
Output
boolean | whether postback has caused the control data change. False if the page is not in postback mode.
Exception
## getDirection
public TSliderDirection getDirection | ()
Output
TSliderDirection | Direction of slider (Horizontal or Vertical). Defaults to Horizontal.
Exception
## getMaxValue
public float getMaxValue | ()
Output
float | Maximum value for the slider. Defaults to 100.0.
Exception
## getMinValue
public float getMinValue | ()
Output
float | Minimum value for slider. Defaults to 0.0.
Exception
## getProgressIndicator
public boolean getProgressIndicator | ()
Output
boolean | wether to display a progress indicator or not. Defaults to true.
Exception
## getSliderOptions
protected array getSliderOptions | ()
Get javascript sliderr options.
Output
array | slider client-side options
Exception
## getStepSize
public float getStepSize | ()
Output
float | Step size. Defaults to 1.0.
Exception
## getTagName
public string getTagName | ()
Output
string | the HTML tag name for slider. Defaults to div.
Exception
## getValue
public float getValue | ()
Output
float | current value of slider
Exception
## getValues
public array getValues | ()
Output
array | list of allowed values the slider can take. Defaults to an empty array.
Exception
## loadPostData
public boolean loadPostData | (string $key , array $values )
Loads user input data. This method is primarly used by framework developers.
Input
string | $key | the key that can be used to retrieve data from the input data collection
array | $values | the input data collection
Output
boolean | whether the data of the component has been changed
Exception
## onPreRender
public void onPreRender | (mixed $param )
Registers CSS and JS. This method is invoked right before the control rendering, if the control is visible.
Input
mixed | $param | event parameter
Output
Exception
## onValueChanged
public void onValueChanged | (TEventParameter $param )
Raises OnValueChanged event. This method is invoked when the Value property changes on postback. If you override this method, be sure to call the parent implementation to ensure the invocation of the attached event handlers.
Input
TEventParameter | $param | event parameter to be passed to the event handlers
Output
Exception
## raisePostDataChangedEvent
public void raisePostDataChangedEvent | ()
Raises postdata changed event. This method is required by IPostBackDataHandler interface. It is invoked by the framework when Value property is changed on postback. This method is primarly used by framework developers.
Output
Exception
## registerSliderClientScript
protected void registerSliderClientScript | ()
Registers the javascript code to initialize the slider.
Output
Exception
## registerStyleSheet
protected void registerStyleSheet | ()
Registers the CSS relevant to the TSlider. It will register the CSS file specified by CssUrl. If that is not set, it will use the default CSS.
Output
Exception
## renderContents
public void renderContents | (mixed $writer )
Render the body content
Input
mixed | $writer |
Output
Exception
## setAutoPostBack
public void setAutoPostBack | (boolean $value )
Sets the value indicating if postback automatically. An automatic postback to the server will occur whenever the user modifies the slider value.
Input
boolean | $value | the value indicating if postback automatically
Output
Exception
## setCssUrl
public void setCssUrl | (string $value )
Input
string | $value | URL for the CSS file including all relevant CSS class definitions.
Output
Exception
## setData
public void setData | (string $value )
Sets the value of the TSlider control. This method is required by IDataRenderer. It is the same as setValue().
Input
string | $value | the value of the TSlider control.
Output
Exception
## setDirection
public void setDirection | (TSliderDirection $value )
Input
TSliderDirection | $value | Direction of slider (Horizontal or Vertical)
Output
Exception
## setMaxValue
public void setMaxValue | (float $value )
Input
float | $value | Maximum value for slider
Output
Exception
## setMinValue
public void setMinValue | (float $value )
Input
float | $value | Minimum value for slider
Output
Exception
## setProgressIndicator
public void setProgressIndicator | (boolean $value )
Input
boolean | $value | wether to display a progress indicator or not. Defaults to true.
Output
Exception
## setStepSize
public void setStepSize | (float $value )
Sets the step size used to determine the places where the slider handle can stop at. An evenly distributed stop marks will be generated according to MinValue, MaxValue and StepSize. To use uneven stop marks, set Values.
Input
float | $value | Step size.
Output
Exception
## setValue
public void setValue | (float $value )
Input
float | $value | current value of slider
Output
Exception
## setValues
public void setValues | (array $value )
Sets the possible values that the slider can take. If this is set, StepSize will be ignored. The latter generates a set of evenly distributed candidate values.
Input
array | $value | list of allowed values the slider can take
Output
Exception
Constant Details
### MAX_STEPS #### Type: int #### Value: 200