RadTextBox too wide

3 posts, 0 answers
  1. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 27 Mar 2009 Link to this post

    Hi there

    I've got a small cosmetic problem regarding the RadTextBox (and possibly others).

    Generally all of my controls are 500px wide (translated to 497px), which is set on the Width-property of the controls
    Some of controls are hidden through CSS at page load in the code-behind using control.Style[HtmlTextWriterStyle.Display] = "none".

    This works as expected, but when I through JavaScript shows the controls by doing

    $get("<%=control.ClientID%>").style.display = "";

    the controls shows to be 3px wider that the rest of the controls.

    It looks like the controls are compensating for the borders when they are rendered vissible, but this doesn't seem to happen when they are hidden.

    Is there any way I can force specific controls to calculate their correct widths on page load, even though they're hidden, perhaps through the clientside pageLoad event?
  2. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 27 Mar 2009 Link to this post

    I figured it out I guess... I simply call the repaint() method when I display the control. That seems to have fixed the problem.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 27 Mar 2009 Link to this post

    Oh, ant BTW, I found this function using Firebug for Firefox. Kind of annoying it wasn't mentioned anywhere in the documentation.
Back to Top