panels
-
Is there any article where i hide and show a panel.. prefebably in an animation manner that slowly slides in
-
Is there any article where i hide and show a panel.. prefebably in an animation manner that slowly slides in
Hi, Well I am not able to find any such links, but probably you could try this given code which implements sliding of panels. The basic implementation includes decreasing or increasing the height of the panel on Timer tick. For example: We have a Panel, Timer and a Button control. On button control we are closing and opening the panel. BEGIN CODE
bool close=false; private void timer1_Tick(object sender, EventArgs e) { if (close==false) { if (panel1.Height > 0) panel1.Height -= 10; else { timer1.Enabled = false; close = true; } } else { if (panel1.Height < 190) panel1.Height += 10; else { timer1.Enabled = false; close = false; } } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; }
END CODE I hope this will help. Regards, AllenAllen Smith ComponentOne LLC www.componentone.com
-
Hi, Well I am not able to find any such links, but probably you could try this given code which implements sliding of panels. The basic implementation includes decreasing or increasing the height of the panel on Timer tick. For example: We have a Panel, Timer and a Button control. On button control we are closing and opening the panel. BEGIN CODE
bool close=false; private void timer1_Tick(object sender, EventArgs e) { if (close==false) { if (panel1.Height > 0) panel1.Height -= 10; else { timer1.Enabled = false; close = true; } } else { if (panel1.Height < 190) panel1.Height += 10; else { timer1.Enabled = false; close = false; } } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; }
END CODE I hope this will help. Regards, AllenAllen Smith ComponentOne LLC www.componentone.com
perfect. thnks