qdatagridview.cs

来自「基于C/S的医疗卫生管理系统」· CS 代码 · 共 49 行

CS
49
字号
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace Qeb.Control
{
    public partial class QDataGridView : System.Windows.Forms.DataGridView
    {
        public QDataGridView()
        {
            InitializeComponent();
            Init();
        }

        public QDataGridView(IContainer container)
        {
            container.Add(this);
            InitializeComponent();
            Init();
        }

        private void Init()
        {
            this.BackgroundColor = Color.White;
            this.BorderStyle = BorderStyle.None;
            this.ColumnHeadersHeight = 22;
            this.RowTemplate.Height = 22;
            this.DefaultCellStyle.BackColor = Color.White;
            this.AlternatingRowsDefaultCellStyle.BackColor = Color.Silver;
        }
        //[Category("外观"), Description("控件样式"), DefaultValue("Color.White")]
        //public new System.Drawing.Color BackgroundColor
        //{
        //    get
        //    {
        //        return base.BackgroundColor;
        //    }
        //    set
        //    {
        //        base.BackgroundColor = value;
        //    }
        //}
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?