public CollapsiblePanel()
        {
            this.SetStyle(ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);

            this.DoubleBuffered = true;

            // Setup button
            button          = new CollapseButton();
            button.Size     = new Size(this.Width, 25);
            button.Location = new Point(0, 0);
            button.Font     = new Font("Tahoma", 8.0f, FontStyle.Bold);
            button.Dock     = DockStyle.Top;
            button.Click   += new EventHandler(button_Click);
            this.Controls.Add(button);

            // Setup timer
            timer          = new Timer();
            timer.Interval = 25;
            timer.Tick    += new EventHandler(timer_Tick);
        }
コード例 #2
0
		public CollapsiblePanel()
		{
			this.SetStyle(ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);

			this.DoubleBuffered = true;

			// Setup button
			button = new CollapseButton();
			button.Size = new Size(this.Width, 25);
			button.Location = new Point(0, 0);
			button.Font = new Font("Tahoma", 8.0f, FontStyle.Bold);
            button.Dock = DockStyle.Top;
            button.Click += new EventHandler(button_Click);
			this.Controls.Add(button);

			// Setup timer
			timer = new Timer();
			timer.Interval = 25;
			timer.Tick += new EventHandler(timer_Tick);
		}