Showing posts with label slider. Show all posts
Showing posts with label slider. Show all posts

Wednesday, March 21, 2012

Question about the slider extender control and "hiding" the textbox it extends

Copied and pasted from the interactive sample pages, under slider tips:

TextBox visibility. The asp:TextBox that the Slider is upgrading will be visible during the page loading, so it is usable if JavaScript is not enabled on the browser. Depending on your requirements, you can prevent the asp:TextBox from being visible by setting its display mode to "none".

However, there is no display mode or displaymode property for the textbox control, nor for the slider extender. How then can I prevent the textbox from being visible while the page is loading?

Another question: is there a way to set the slider to enabled = "false" where it would show the value (e.g. the slider being at the middle of the rail for a value of 50%) without it being movable? I tried setting the textbox to enabled = false. The slider looks somewhat grayed out, but you can still click on the slider and move it. Thanks a lot.

Hi,

1) display is a CSS attribute. you should set display:none on the extended TextBox.

2) At the moment the slider can't be disabled, but this is a good suggestion.

Thanks.


Ah thanks. Forgot about the css attribute for that.

As for the slider not being enabled or disabled, I guess I'll just make it invisible for now.

Question: How can I get embedded images to work in my extender?

I've followed the Slider, and the ValidatorCallout .. but my images will just not work. Anything more than just the assembly line, and what is in the javascript to get this to work?

I get the "my images will just not work" part. As for the rest, I'm not sure. But what I'd like to know is how you makeHandleImageUrl="../T1818.jpgwork. Is there something more required to make an 18x18 image replace the default slider handle? Maybe we're asking the same question?


There are a couple steps to embedding the image with your extender.

First, add the image to your assembly as an Embedded Resource, just like the behavior js file associate with the extender.