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中控件也显示了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM