473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Rounded corner panel

Please tell me how to get a panel with rounded corner..

I am using below code for that,but i am not getting the panel with rounded corners.If the value of Radius is increased only the Width of panel increases.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Panel titlePanel = new Panel();
  3.  
  4. AjaxControlToolkit.RoundedCornersExtender roundPanel = new AjaxControlToolkit.RoundedCornersExtender();
  5. roundPanel.ID = "roundPanel";
  6. roundPanel.TargetControlID = titlePanel.ID; 
  7. roundPanel.Radius = 5;
  8. pnlGetInfoTool.Controls.Add(roundPanel);
  9.  
  10.  
Regards,
Manjit
Nov 7 '08 #1
2 2089
Frinavale
9,735 Expert Mod 8TB
You need to declare your control as a global member to your aspx page and you need to instantiate it in your Page Init event.

The following works for me:

Expand|Select|Wrap|Line Numbers
  1.    Private testLabel As Label
  2.     Private testPanel As Panel
  3.     Private testRoundedCorners As AjaxControlToolkit.RoundedCornersExtender
  4.  
  5. Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
  6.  
  7.         testLabel = New Label
  8.         testLabel.Text = "Hello World!"
  9.         testPanel = New Panel
  10.         testPanel.ID = "testPanel"
  11.         testPanel.Controls.Add(testLabel)
  12.         testRoundedCorners = New AjaxControlToolkit.RoundedCornersExtender
  13.         testRoundedCorners.ID = "testingCorners"
  14.         testRoundedCorners.TargetControlID = "testPanel"
  15.         testRoundedCorners.Color = Drawing.Color.DarkGreen
  16.  
  17. 'TestSectionPanel exists on the page already
  18.         TestSectionPanel.Controls.Add(testPanel)
  19.         TestSectionPanel.Controls.Add(testRoundedCorners)
  20.     End Sub
  21.  
-Frinny
Nov 7 '08 #2
Thank you very much for your reply.

Regards,
Manjit
Nov 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dan V. | last post by:
What is the best way to have a background image stretch and have the 'left rounded corner' look. Please see the top header at this website for an example: www.kingtree.ca and...
2
by: Dino Buljubasic | last post by:
Hi, I have several panels that holds bunch of controls with information on my forms. My form has background image property set to an image that has borders defining where my panel comes and...
1
by: serge calderara | last post by:
Dear all Any idea to how to make a panel with rounded corner ? regards serge
1
by: Stephen Takacs | last post by:
I've been reading lots of rounded corners table tutorials lately, because I'm a Perl guru, not an HTML guru. :-) So far all of the examples I've seen have edges with narrow angles, which fit...
8
by: TheCornjerker | last post by:
I've been looking into what method I should use to show rounded corners (and I've found a lot). My question is why does Google seems to mostly use the table method with an image in each corner. ...
3
by: laredotornado | last post by:
Hi, I was recently exploring JQuery and the rounded corner plugin -http:// methvin.com/jquery/jq-corner-demo.html, unfortunately, this plug-in seems to only apply to rounding corners in the...
5
by: Stuart Ferguson | last post by:
I am looking to create the effect shown in the image (http://img291.imageshack.us/img291/4476/effectuc6.jpg) this is taken from www.asp.net. I was wondering if there is a specific technique to...
1
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could...
2
by: raknin | last post by:
Hi, I am looking for a css and js solution for making rounded corners, with no images. Currently I tried to use nify corners as describe in http://www.html.it/articoli/nifty/index.html in example...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.