Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
WebSlider not visible
posted

I have a function that dynamically adds a webslider control to a web page.  However, when the page is rendered the control is invisible.  It is on the page (I can see it in the HTML), but it isn't displayed.

Am I missing an attribute, or do I have a value configured incorrectly?

       private WebSlider loadWebSlider(string fieldname, string displayas, Table tb)
        {
            WebSlider ws = new WebSlider();
            ws.EnableSecondaryValue = true;
            ws.MaxValue = 10.00;
            ws.MinValue = 0.00;
            ws.Value = 1;
            ws.SecondaryValue = 9;
            ws.ContentAlignment = SliderContentAlignment.Center;
            ws.Width = 488; // Unit.Percentage(100);
            ws.Height = 60;
            ws.Orientation = Orientation.Horizontal;
            ws.ThumbsInteractionMode = SliderThumbsInteractionMode.Lock;
            ws.Tickmarks.NumberOfLabels = 3;
            ws.Tickmarks.LabelLocation = SliderTickmarkLabelLocation.BottomOrRight;
            ws.ValueType = SliderValueType.Decimal;
            ws.ValueLabel.CssClass = "slider";
            ws.ValueLabel.Format = "${0}..${1}";
            ws.ValueLabel.Location = SliderValueLabelLocation.RightOrBottom;
            string gadgetName = "webslider_" + fieldname;
            ws.ID = gadgetName;
            ws.MinusButton.ImageUrl = "~/Images/igsli_MinusH.gif";
            ws.MinusButton.DisabledImageUrl = "~/Images/igsli_MinusDisableH.gif";
            ws.MinusButton.FocusImageUrl = "~/Images/igsli_MinusFocusH.gif";
            ws.MinusButton.HoverImageUrl = "~/Images/igsli_MinusHoverH.gif";
            ws.MinusButton.PressedImageUrl = "~/Images/igsli_MinusPressH.gif";
            ws.PlusButton.ImageUrl = "~/Images/igsli_PlusH.gif";
            ws.PlusButton.DisabledImageUrl = "~/Images/igsli_PlusDisableH.gif";
            ws.PlusButton.FocusImageUrl = "~/Images/igsli_PlusFocusH.gif";
            ws.PlusButton.HoverImageUrl = "~/Images/igsli_PlusHoverH.gif";
            ws.PlusButton.PressedImageUrl = "~/Images/igsli_PlusPressH.gif";
            ws.ShowPlusMinusButtons = false;            
            ws.Thumb.ImageUrl = "~/Images/igsli_ThumbH.gif";
            ws.Thumb.DisabledImageUrl = "~/Images/igsli_ThumbDisableH.gif";
            ws.Thumb.FocusImageUrl = "~/Images/igsli_ThumbFocusH.gif";
            ws.Thumb.HoverImageUrl = "~/Images/igsli_ThumbHoverH.gif";
            ws.Thumb.PressedImageUrl = "~/Images/igsli_ThumbPressH.gif";
            ws.SecondaryThumb.ImageUrl = "~/Images/igsli_ThumbH.gif";
            ws.SecondaryThumb.DisabledImageUrl = "~/Images/igsli_ThumbDisableH.gif";
            ws.SecondaryThumb.FocusImageUrl = "~/Images/igsli_ThumbFocusH.gif";
            ws.SecondaryThumb.HoverImageUrl = "~/Images/igsli_ThumbHoverH.gif";
            ws.SecondaryThumb.PressedImageUrl = "~/Images/igsli_ThumbPressH.gif";

            TableRow tr = new TableRow();
            TableCell tc = new TableCell();
            tc.Controls.Add(ws);
            tr.Cells.Add(tc);
            tb.Controls.Add(tr);

            return ws;
        }