随笔分类 -  Winform

winfrom控件的一些使用
摘要:1.设置Combox属性: DropDownStyle:DropDown 2.添加TextUpdate事件 3.下列为Name = cb_material 的 combox 控件 private void cb_material_TextUpdate(object sender, EventArgs 阅读全文
posted @ 2020-07-21 16:14 Besos 阅读(1160) 评论(0) 推荐(0)
摘要:1.这里用CellMouseClick鼠标点击事件 private void DataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { //if (e.Button == MouseButtons. 阅读全文
posted @ 2020-07-21 15:45 Besos 阅读(501) 评论(0) 推荐(0)
摘要:解决跨线程操作控件 - 可使用委托方法 解决方法: public void SetlableText(string str,int i) { label1.Text = str + i; } private void btnsearch_Click(object sender, EventArgs 阅读全文
posted @ 2020-07-17 15:56 Besos 阅读(147) 评论(0) 推荐(0)
摘要:DataGridView列增加单选按钮,并设置被选中 1.DataGridView新增列时,设置属性 “ColumnType” = DataGridViewCheckBoxColumn 2.可使用CellContentClick事件 if (this.data.Columns[e.ColumnInd 阅读全文
posted @ 2020-07-17 14:55 Besos 阅读(1491) 评论(0) 推荐(0)
摘要:DataGridView自动添加序号 DataGridView找到RowPostPaint事件 private void dg_item_info_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { SetDataGr 阅读全文
posted @ 2020-07-17 11:35 Besos 阅读(458) 评论(0) 推荐(0)