Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. panels

panels

Scheduled Pinned Locked Moved C#
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benjamin yap
    wrote on last edited by
    #1

    Is there any article where i hide and show a panel.. prefebably in an animation manner that slowly slides in

    C 1 Reply Last reply
    0
    • B benjamin yap

      Is there any article where i hide and show a panel.. prefebably in an animation manner that slowly slides in

      C Offline
      C Offline
      C1AllenS
      wrote on last edited by
      #2

      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, Allen

      Allen Smith ComponentOne LLC www.componentone.com

      B 1 Reply Last reply
      0
      • C C1AllenS

        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, Allen

        Allen Smith ComponentOne LLC www.componentone.com

        B Offline
        B Offline
        benjamin yap
        wrote on last edited by
        #3

        perfect. thnks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups