37.winform之panel

实现

37.winform之panel
37.winform之panel

37.winform之panel

代码

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp7 {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e) {
            panel1.Visible = true;
        }

        private void button2_Click(object sender, EventArgs e) {
            panel1.Visible = false;
        }
    }
}

通过效果可以发现panel看不见,但是它是存在的,当我们隐藏panel时,panel中控件也隐藏了,当显示时,pannel中控件也显示了

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案