2012年3月21日水曜日

Rounded Corners cannot accept Width = "__%"

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

All I'm trying to do ismake a panel sit inside of another panel.
Theinner panel must have rounded corners and both panelsmust resize with the browser window.


Without Atlas RoundedCorners I can say:

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

<asp:PanelID="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:scriptmanagerid="ScriptManager1"runat="server"/>
<cc2:roundedcornersextenderid="RoundedCornersExtender1"runat="server">
<cc2:RoundedCornersPropertiesRadius="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 replaceWidth="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

So, no-one has any thoughts on this ?

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


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


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.


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.

0 件のコメント:

コメントを投稿