Amulet Widgets
Amulet Widgets Control Widgets
Amulet Widgets Custom Slider
The Custom Slider Widget acts like a regular Slider Widget, except for the fact that you get to specify the channel image and two different handle images. The Custom Slider Widget invokes a function (or set of functions) either upon change or release, depending upon the hrefEvent parameter. If hrefEvent is setup as on Change, the slider invokes the function(s) whenever the handle moves. If hrefEvent is setup as on Release , the slider invokes the function(s) only upon releasing the handle. Touching anywhere on the channel causes the handle to snap to that location and invoke the function(s) with the corresponding argument. The argument is determined by the location of the handle and the limits setup with the min and max attributes. The location of the min value is determined by the minAt attribute(left, right, top or bottom). The height and width dimensions determines whether the slider is horizontal or vertical. The longer dimension establishes the path that the slider handle travels.
An image, channelImage, is used as the slider's channel, which must be the same dimensions as the Custom Slider Widget. Two different images are used for the slider handle. One image, handleImage, is used when the handle is not touched, and another, handleTrackingImage, for when the handle is active. As an option, you can specify the offset of the handle from the center of the channel by using the handleOffset parameter.
It is possible to use a handleTrackingImage that contains transparent components. If the handleTrackingImage does not have transparency components, then a single copy of the handleTrackingImage will be moved along the channel and the transparency components will not be updated. If the image has transparency components, the handleTrackingImage will be forced to be redrawn at each new location. This will result in a slightly slower update of the tracking handle.
Parameter="invisible" value="CHECKED" or "UNCHECKED" — Specifies if the Custom Slider is to start out invisible or not. If the attribute is not CHECKED, then by default the Custom Slider is visible. If the Custom Slider starts out invisible, the only way to make it visible again is via the IWC method reappear(). If invisible not specified, the default is UNCHECKED.
Parameter="channelImage" value="image" — Image used as the background over which the slider handle travels. Image dimensions MUST be exactly the same as the dimensions of the Custom Slider Widget. Image file must be of type .GIF, .JPG, or .PNG.
Parameter="handleImage" value="image" — Image used as the slider handle when not pressed. Image file must be of type .GIF, .JPG, or .PNG.
Parameter="handleTrackingImage" value="image" — Image used as the slider handle when pressed. Image file must be of type .GIF, .JPG, or .PNG.
Parameter="href" value="function(s)" — The function (or multiple/sequenced functions) invoked upon the event specified in hrefEvent. See Appendix B for all available functions for the Slider widget.
Parameter="hrefEvent" value="On Change" or "On Release" — The event which triggers the launching of the href function. If set to On Change, the slider will launch the function call whenever the handle is moved. If set to On Release, the slider will only launch the function call upon the releasing of the slider handle. If hrefEvent is not specified, the default is On Change.
Parameter="initialCondition" value="number" or "FromInitHref" — Specifies handle position when the page is loaded. The position value becomes the argument given to the href function(s). If FromInitHref is selected, the function specified by the InitHref attribute is called. The returned value determines the handle position. [The range is 0 - 65535 (0x00 - 0xFFFF)]
Parameter="max" value="number" — The maximum value used as the argument given to the function(s) specified in href. By default, maximum value is achieved when handle is full-right on a horizontal slider, or full-top on a vertical slider. The range is 1 - 65535 (0x01 - 0xFFFF).
Parameter="min" value="number" — The minimum value used as the argument given to the function(s) specified in href. By default, minimum value is achieved when handle is full-left on a horizontal slider, or full-bottom on a vertical slider. The range is 0 - 65534 (0x00 - 0xFFFE).
Parameter="minAt" value=""LEFT" or "RIGHT" or "TOP" or "BOTTOM"" — Determines where the minimum value of the slider is located. As the handle sweeps from the minAt location, the value increases until the maximum value is reached at the opposite extreme of the minAt location. Default values are LEFT for horizontal sliders and BOTTOM for vertical sliders. The options are:
Parameter="handleOffset" value="number" — Specifies the number of pixels from the center of the channel the handle is located. If a vertical slider, positive numbers shift the handle to the right and negative numbers shift it to the left. If a horizontal slider, positive numbers shift the handle to the bottom and negative numbers shift it to the top. [The range is -100 through 100]
Parameter="initHref" value="function" — Specifies the function called when the page is loaded. Use this attribute whenever FromInitHref is used as the initialCondition. The value returned from this function call will be used as the initial condition of the Custom Slider handle. See Appendix B for all available functions.
Parameter="waitForInit" value="CHECKED" or "UNCHECKED" — Only valid if FromInitHref is used as the initialCondition. Specifies if the Custom Slider handle will wait for valid data before being displayed on the channel. If CHECKED, the Custom Slider handle will not display until the data from the initHref function is received. If UNCHECKED, or the attribute is not present, the Custom Slider handle momentarily starts at the minAt location until the initHref function receives its data. If waitForInit not specified, the default is UNCHECKED.

Start Here
Development Tools
| Site Use Terms | Terms of Sale | Privacy | Warranty | Site Map | |