Rounded Corners cannot accept Width = "__%"

Last post 07-02-2009 10:03 PM by adammal. 7 replies.

Sort Posts:

  • Rounded Corners cannot accept Width = "__%"

    08-31-2006, 12:12 PM
    • Member
      15 point Member
    • Wotney
    • Member since 06-05-2006, 11:47 AM
    • Hampshire, UK
    • Posts 6

    Hopefully, somebody may be able to tell me if I'm doing something wrong here.

    All I'm trying to do is make a panel sit inside of another panel.
    The inner panel must have rounded corners and both panels must resize with the browser window.


    Without Atlas RoundedCorners I can say:

    <asp:Panel ID="OuterPanel" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="blue"
                     Style="left: 5%; top: 5%; position: relative" Height="90%" Width="90%">

    <asp:Panel ID="InnerPanel" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="red"
                    
    Style="position: absolute; margin-left:10%; margin-top:12%" Height="73%" Width="90%" >
    </asp:Panel>

    </asp:Panel>

    and everything behaves and looks fine (minus the rounded corners) - this includes both panels resizing with the window

    However... once I add the RoundedCornersExtender and point it at the Inner Panel

    <cc1:scriptmanager id="ScriptManager1" runat="server"/>
    <
    cc2:roundedcornersextender id="RoundedCornersExtender1" runat="server">
    <cc2:RoundedCornersProperties Radius="10" TargetControlID="InnerPanel"/>
    </
    cc2:roundedcornersextender>


    ...The graphics get all confused.
    Yes, I've got the rounded corners, but 2 things are wrong.

    1.  The inner panel stops resizing in Width (resizes ok in height)
    2.  It looks like a transparent box of almost the same height as the panel is missing from the right of the Inner panel.

    The really wierd thing is:
    If (on the Inner Panel) I replace Width="90%" for Width="700px" Then the above 2 problems are fixed.

    But, that leaves me with a panel that doesn't resize with the rest of the controls on my page - totally defeating the point !!

    I don't understand why this Atlas control works fine with Height="90%", but not Width="90%"

    Can anyone help ?
    I've been struggling for ages with this !

    Thanks,
    Scott

  • Re: Controls with Rounded Corners cannot accept Width = "__%"

    09-04-2006, 6:43 AM
    • Member
      15 point Member
    • Wotney
    • Member since 06-05-2006, 11:47 AM
    • Hampshire, UK
    • Posts 6

    So, no-one has any thoughts on this ???

    Aren't there any Atlas type officials out there at least willing to recognise this bug ??

     

  • Re: Controls with Rounded Corners cannot accept Width = "__%"

    02-20-2007, 8:17 PM
    • Member
      23 point Member
    • graemea100
    • Member since 06-22-2005, 9:34 PM
    • Posts 9

    From what I can tell this is a bug... you cannot set the height or width to xxx% when using the Rounded Corners extender. It has never worked for me. So I just make sure that the data I put into the panel is of a predefined height,

     Dunno if it will ever get fixed.

    Cheers
    Graeme

  • Re: Rounded Corners cannot accept Width = "__%"

    10-22-2007, 5:44 AM
    • Member
      10 point Member
    • baysoft_terry
    • Member since 10-15-2007, 2:24 PM
    • Posts 5

    Check out our free rounded panel control for ASP.NET 2, also our free security code image control. http://www.roundedpanel.baysoft-net.co.uk. Hope this helps. It's pretty flexible.

  • Re: Rounded Corners cannot accept Width = "__%"

    10-22-2007, 12:16 PM

    You've got one panel with position: relative and another with position: absolute and you expect them to behave the same?  Not going to happen.  remove the position: absolute from the second panel. 

    Also, it looks like you might have an older version of the AJAX Toolkit because of the RoundedCornersProperties entity.  Those properties should be in the RoundedCournersExtender tag.  I'd recommend downloading the latest version of the toolkit.

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
  • Re: Rounded Corners cannot accept Width = "__%"

    01-03-2008, 9:27 AM
    • Member
      15 point Member
    • Wotney
    • Member since 06-05-2006, 11:47 AM
    • Hampshire, UK
    • Posts 6

    Hey, thanks very much Mr. Budha !

    Yeah, I was using the old toolkit back in 2006 and thankfully, I've finished that project quite a while ago.
    But thanks again for your input :)

     

    Regards,

    Scott

  • Re: Rounded Corners cannot accept Width = "__%"

    08-15-2008, 3:01 PM
    • Member
      2 point Member
    • TRScheel
    • Member since 08-15-2008, 6:58 PM
    • Posts 1

    Sorry to necro this post, but I spent a long time today researching this issue for a solution and when googling it this post came up near the top regularly.

     A solution to this issue is to apply a style to the targeted panel on page load, for example:

     

    Wrapper.ApplyStyle(new Style() { Width = Unit.Percentage(100) });

      

     

  • Re: Rounded Corners cannot accept Width = "__%"

    07-02-2009, 10:03 PM
    • Member
      7 point Member
    • adammal
    • Member since 03-06-2006, 3:54 AM
    • Posts 2

    Thanks heaps for this solution TRScheel! 


    Worked like a charm!

Page 1 of 1 (8 items)