随笔分类 - Winform
winfrom控件的一些使用
摘要:1.设置Combox属性: DropDownStyle:DropDown 2.添加TextUpdate事件 3.下列为Name = cb_material 的 combox 控件 private void cb_material_TextUpdate(object sender, EventArgs
阅读全文
摘要:1.这里用CellMouseClick鼠标点击事件 private void DataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { //if (e.Button == MouseButtons.
阅读全文
摘要:解决跨线程操作控件 - 可使用委托方法 解决方法: public void SetlableText(string str,int i) { label1.Text = str + i; } private void btnsearch_Click(object sender, EventArgs
阅读全文
摘要:DataGridView列增加单选按钮,并设置被选中 1.DataGridView新增列时,设置属性 “ColumnType” = DataGridViewCheckBoxColumn 2.可使用CellContentClick事件 if (this.data.Columns[e.ColumnInd
阅读全文
摘要:DataGridView自动添加序号 DataGridView找到RowPostPaint事件 private void dg_item_info_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { SetDataGr
阅读全文

浙公网安备 33010602011771号