winform Label与DataGridView右对齐
时间:2014-05-20 13:53:04
收藏:0
阅读:417
实现Label与DataGridView对齐有两种方法,差别不大:
定义:
Label名称:lblName
DataGridView名称:dgvData
第一种:
lblName.Location = new Point(dgvData.Location.X + dgvData.Width - lblName.Width, lblName.Location.Y);
第二种:
lblName.Location = new System.Drawing.Point(dgvData.Location.X + dgvData.Width - lblName.Width, lblName.Location.Y);
评论(0)