 |
|
 |
Hi, this lib is cool, but i meet the problem. since i put the label inside the rounded panel. The label cannot been show. Can i know how to solve it. thank ya
<embed src="http://www.blingyblob.com/glittermatic/holder.swf?message=Elaine%20Seah&font=fonts/font15.swf&glitter=glitters/glitter7.swf&swfHeight=85&bevel=1&shadow=1&glow=1&blur=0&fade=1&blink=0&fontsize=53&num=7" quality="high" wmode="transparent" bgcolor="ffffff" width="500" height="85" name="glitters" align="middle" allowScriptAccess="samedomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >
|
|
|
|
 |
|
 |
i have to found the solution for this. Thank ya. And i meet up other problem is when i print the page. The top and bottom border will disappear. i have no idea to make it ? can any one help?
<embed src="http://www.blingyblob.com/glittermatic/holder.swf?message=Elaine%20Seah&font=fonts/font15.swf&glitter=glitters/glitter7.swf&swfHeight=85&bevel=1&shadow=1&glow=1&blur=0&fade=1&blink=0&fontsize=53&num=7" quality="high" wmode="transparent" bgcolor="ffffff" width="500" height="85" name="glitters" align="middle" allowScriptAccess="samedomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >
|
|
|
|
 |
|
 |
Hi,
I had the same problem as you mentioned in labels
So I change the span properties in the rounded panel
.....
sbOut.Append("* html .xrounded em {width:24px; height:12px; width:0; height:0;}");
sbOut.Append("#" + id + " .xrounded span {display:inline; width:auto; height:auto; color:" + borderColor +
"; overflow:hidden; border-top:10px solid " + panelColor + "; border-left:10px dotted transparent; border-right:10px dotted transparent; margin-left:0px; margin-top:0px;}");
sbOut.Append("* html .xrounded span {width:20px; height:10px; width:0; height:0;}");
.....
Thanks
Regards
Wasana
Sri Lanka
|
|
|
|
 |
|
 |
even i have a same problem.. i want to display a lable in rounded panel plz help me... thans in advance
|
|
|
|
 |
|
 |
Why we have that bug; cause when adding child control (like label control) our roundedpanel control style "span attribute" hide or break our child controls. If look the source of the page we see all controls there but not show on page.
Now, i fix this error 3 steps. 1.Remove RenderContents 2.Add override Render Children 3.Add override Render and In sytle remove span keyword. override RenderChildren <code> protected override void RenderChildren(HtmlTextWriter output) { if (HasControls()) { for (int i = 0; i <= Controls.Count - 1; i++) { Controls[i].RenderControl(output); } } } </code> override Render <code> protected override void Render(HtmlTextWriter output) { string borderColor = ColorTranslator.ToHtml(PanelBorderColor); string backColor = ColorTranslator.ToHtml(PanelOuterBackColor); string panelColor = ColorTranslator.ToHtml(PanelInnerBackColor); string foreColor = ColorTranslator.ToHtml(PanelTextColor); string id = ClientID + "_inner"; StringBuilder sbOut = new StringBuilder(); // Build the CSS sbOut.Append("<style type=\"text/css\">#" + id + " {background:" + backColor + "; width:" + Width + "; height:" + Height + "; margin:0px; padding:0px;}"); sbOut.Append("#" + id + " .xrounded p {margin 10px; letter-spacing:1px;}"); sbOut.Append("#" + id + " .xrounded p {padding-bottom .5em; color:" + foreColor + ";}"); sbOut.Append("#" + id + " .xrounded {background: transparent; margin:0em;}"); sbOut.Append("#" + id + " .xrounded em {display:block; width:10; height:10; color:" + foreColor + "; overflow:hidden; border-top:12px solid " + borderColor + "; border-left:12px dotted transparent; border-right:12px dotted transparent; margin-left:50px;}"); sbOut.Append("* html .xrounded em {width:24px; height:12px; width ; height ;}"); sbOut.Append("* html .xrounded span {width:20px; height:10px;}"); sbOut.Append(".xb1, .xb2, .xb3, .xb4, .xb5, .xb6, .xb7 {display:block; overflow:hidden; font-size ;}"); sbOut.Append(".xb1, .xb2, .xb3, .xb4, .xb5, .xb6 {height:1px;}"); sbOut.Append("#" + id + " .xb4, #" + id + " .xb5, #" + id + " .xb6, #" + id + " .xb7 {background:#ccc; border-left:1px solid " + borderColor + "; border-right:1px solid " + borderColor + ";}"); sbOut.Append("#" + id + " .xb1 {margin 8px; background:" + borderColor + ";}"); sbOut.Append("#" + id + " .xb2 {margin 6px; background:" + borderColor + ";}"); sbOut.Append("#" + id + " .xb3 {margin 4px; background:" + borderColor + ";}"); sbOut.Append("#" + id + " .xb4 {margin 3px; background:" + panelColor + "; border-width 5px;}"); sbOut.Append("#" + id + " .xb5 {margin 2px; background:" + panelColor + "; border-width 4px;}"); sbOut.Append("#" + id + " .xb6 {margin 2px; background:" + panelColor + "; border-width 3px;}"); sbOut.Append("#" + id + " .xb7 {margin 1px; background:" + panelColor + "; border-width 3px; height:2px;}"); sbOut.Append("#" + id + " .xboxcontent {display:block; background:" + panelColor + "; border:3px solid " + borderColor + "; border-width 3px;}</style>"); // Start Build the panel structure sbOut.Append("<div id=\"" + id + "\">"); sbOut.Append("<div class=\"xrounded\" style=\"height: 100%\">"); sbOut.Append("<b class=\"xb1\"></b><b class=\"xb2\"></b><b class=\"xb3\"></b><b class=\"xb4\"></b><b class=\"xb5\"></b><b class=\"xb6\"></b><b class=\"xb7\"></b>"); sbOut.Append("<div class=\"xboxcontent\" style=\"height: 100%\">"); output.Write(sbOut.ToString()); //Render Children controls this.RenderChildren(output); // End Build the panel structure output.Write("</div>"); output.Write("<b class=\"xb7\"></b><b class=\"xb6\"></b><b class=\"xb5\"></b><b class=\"xb4\"></b><b class=\"xb3\"></b><b class=\"xb2\"></b><b class=\"xb1\"></b>"); output.Write("</div>"); output.Write("</div>"); } </code> Happy programming.
|
|
|
|
 |
|
 |
I can create the panel, but when I try to put a control in it and set a property of the control from the code behind, the changes to the control do not render. Example: If I put a Label in my rounded panel, then try to set it's Text property, the label will not show my text. Sometimes it even shows some weird triangle where the label should be. If I comment out your CSS, the panel works fine. Code example: aspx: . . . <body> <form id="form1" runat="server"> <ucl:RoundedPanel ID="pnlRoundedPanel" runat="server" Width="300px"> This text will show <br /> <asp:Label ID="lblLabel" runat="server" /> </ucl:RoundedPanel> </form> </body> . . . cs: protected void Page_Load(object sender, EventArgs e) { lblLabel.Text = "This text will not"; } From what your article says this should work. And what's the deal with the weird triangle? There is nothing special about the page, no master page or other styles. Just a blank page.
|
|
|
|
 |
|
 |
Label does not work unles you do something such as
foreach (Control ctrl in this.Controls)
{
if (ctrl.GetType().Equals(typeof(Label)))
output.Write(((Label)ctrl).Text);
else
ctrl.RenderControl(output);
}
But by doing so you miss the standard html tags embeded between the controls.
I have found if you use ASP:Literal everything works fine with the code provided by the author.
If someone has a way of determining and parsing all elements within the parent and then rendering appropreatly I would like to see that. I have not attempted to over ride the render function to determine if it could be used to detect Labels and render them in line appropreatly.
Regs,
Steven
|
|
|
|
 |
|
 |
Is there any way to change the rounded corder border width? I would like a thin (1px) border if possible.
|
|
|
|
 |
|
 |
Please read comments below by "intooitive".
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
 |
I am trying to use the rounded panel in a DataList template but the id does not change when it is rendered so the class names don't work. For example, in the code below the id for "Label1" will be changed to "DataList1_ctl00_Label1" for the 1st item in the list and "DataList1_ctl01_Label1" for the 2nd item, and so on. But the RoundedPanel remains "RoundedPanel1" thoughout causing formatting issues in the page (i.e. nothing displays). <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <cc2:RoundedPanel id="RoundedPanel1" runat="server"> <asp:Label ID="Label1" runat="server" Text='<%# Eval("FieldName") %>'></asp:Label> </cc2:RoundedPanel> </ItemTemplate> </asp:DataList> Thanks in advance for any help!
|
|
|
|
 |
|
 |
I cant tell you the exact answer for this right now - but if you have a look at the skmMenu - you could probably figure out how it assigns an ID to the item each time, the default property it uses is ID, but right now I dont have time to look at it. So you will need to do it yourself.
|
|
|
|
 |
|
 |
Hi, Create control, was getting feed up of having to create the rounded controls again and again!! I added you dll to my website, works great But just had a problem with an update panel, I'm adding a trigger see below : <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <Triggers> <asp:PostBackTrigger ControlID="btnUpload" /> </Triggers> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> <cc1:RoundedPanel ID="RoundedPanel1" runat="server" PanelBorderColor="Transparent" PanelInnerBackColor="CornflowerBlue" PanelOuterBackColor="Transparent"> <asp:Panel runat="server" ID="panUpload" Visible="false"> Name <asp:TextBox ID="txtName" runat="server" /><br /> FileName<asp:FileUpload ID="fileup" runat="server" /><br /> <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload File" /> </asp:Panel> </cc1:RoundedPanel> The problem is that the Trigger, it can't seem to find the button 'btnUpload'. If I remove the RoundedPanel, it works fine.. Any ideas?
|
|
|
|
 |
|
 |
Can you programatically find the PANEL control in your code ??
The btnUpload is a child of the Rounded Panel..- try setting the ParseChildren Attribute in the code to true (it is at the top of the code as part of the toolbox designer statements), this might not be the correct way to do it, but it might work.
"The ParseChildren, must be set to false to tell ASP.NET that you have handled the children attributes and no further parsing is required. A value of false indicates that the nested child attributes are not properties of the outer object, but rather are child controls."
|
|
|
|
 |
|
 |
I think it needs some more styling options, like the ability to set the width of the rounded border.
|
|
|
|
 |
|
 |
Then feel free to extend it.
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
 |
Sorry, i can see that didn´t sound very nice, i should have expressed myself better! It was just meant as a tip, really. And i still think it´s a really nice idea!
|
|
|
|
 |
|
 |
No worries. The border width is static due to the nature of the CSS. Each border pixel (3 in this control's case) is represented by an element 1px wide by 1px high. Making it dynamic would require a rather large addition because it would have to dynamically generate multiple divs for each additional pixel in the rounded edge. Toggling the border is simple, because if no border is selected, then the outer divs simply aren't drawn.
I do have plans in the future to create a control that will use GDI+ to draw rounded panels server side, and that will have adjustable border widths.
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
 |
Hello,
I can set the foregroundcolor in the Designer, and the text will be shown correctly in the designer. But when I run the control, the text is black. Is that normal?
Greetz... Paule
|
|
|
|
 |
|
 |
Use the PanelTextColor property to set the text color. It is located under the "Rounded Panel" properties in the designer.
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
 |
The control's bottom left and bottom right corners do not render correctly on IE7?
|
|
|
|
 |
|
 |
It does, just make sure you have the latest version. There was an unclosed div in the first version. Could be a problem with the version I uploaded, but I'll check into it, or you can fix it locally by adding a output.Write("<div>"); to the last line of the RenderContent method.
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
 |
Well, then pls send me your email adress to newsletters@quasar-gmbh.de, and I will send you a screenshot of what I get.
Tnx!
|
|
|
|
 |
|
 |
I don't need to see your screenshot. I was able to reproduce the error. There was a line of test code that was writing a paragraph (p) tag, and not closing it. I've fixed it and updated the source. Thanks for your patience and sorry for the problem.
Quae narravi nullo modo negabo.
|
|
|
|
 |
|
|
 |
|
 |
Hi,
I made a UserControl for alert message on my website, using c#. But this panel is clashing with my DropDownLists on page. Panel goes in background and DropDownLists coming on the panel, just like panel went transparent from the place where its a DropDownList in background. So, right now m making DropDownLists visible = false, for display of my AlertMessage panel. But its too painful to make visible true/false just to show alert message.
Can u plz help me to make my panel opaque???
I am interested in making new components in c#, vb and java
|
|
|
|
 |