Rounded corner panel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manjitsarma
    New Member
    • Jul 2007
    • 34

    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.

    Code:
    Panel titlePanel = new Panel();
    
    AjaxControlToolkit.RoundedCornersExtender roundPanel = new AjaxControlToolkit.RoundedCornersExtender();
    roundPanel.ID = "roundPanel";
    roundPanel.TargetControlID = titlePanel.ID; 
    roundPanel.Radius = 5;
    pnlGetInfoTool.Controls.Add(roundPanel);
    Regards,
    Manjit
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    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:

    [code=vbnet]
    Private testLabel As Label
    Private testPanel As Panel
    Private testRoundedCorn ers As AjaxControlTool kit.RoundedCorn ersExtender

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Init

    testLabel = New Label
    testLabel.Text = "Hello World!"
    testPanel = New Panel
    testPanel.ID = "testPanel"
    testPanel.Contr ols.Add(testLab el)
    testRoundedCorn ers = New AjaxControlTool kit.RoundedCorn ersExtender
    testRoundedCorn ers.ID = "testingCorners "
    testRoundedCorn ers.TargetContr olID = "testPanel"
    testRoundedCorn ers.Color = Drawing.Color.D arkGreen

    'TestSectionPan el exists on the page already
    TestSectionPane l.Controls.Add( testPanel)
    TestSectionPane l.Controls.Add( testRoundedCorn ers)
    End Sub
    [/code]

    -Frinny

    Comment

    • manjitsarma
      New Member
      • Jul 2007
      • 34

      #3
      Thank you very much for your reply.

      Regards,
      Manjit

      Comment

      Working...