Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
How to change width at runtime
posted

I am using three UltraWebGroupBox inside my UltraWebPanel. The border of these three boxes is cutting out. I want to change the width of all three group boxes at runtime. 

I am trying to use folloeing code. But it showing me some error:

GroupBox1.width=WebPanel.width-20;

Any suggestions will be highly appreciated.

Parents
  • 7694
    posted

    Hello,

     You can use the click event of button and set  new width  of WebGroupBox1 and       WebPanel1.  Please take a look at the sample code below:

        protected void Page_Load(object sender, EventArgs e)
        {
            WebGroupBox1.Width = 100;
            WebPanel1.Width = 50;
        }
        protected void Button2_Click(object sender, EventArgs e)
        {
            WebGroupBox1.Width=1000;
            WebPanel1.Width = (int)(WebGroupBox1.Width.Value - 50);
        }


    Hope this helps.
    Thanks.

Reply Children
No Data