b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

datagridview重叠_datagridview绑定list_datagridview右键菜单(59)

电脑杂谈  发布时间:2017-05-30 08:07:57  来源:网络整理

if (errorTooltip == null)

{

errorTooltip = new ToolTip();

errorTooltip.InitialDelay = 0;

errorTooltip.ReshowDelay = 0;

errorTooltip.Active = false;

}

e.Cancel = true;

}

}

}

private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)

{

if (dataGridView1.IsCurrentCellDirty && !String.IsNullOrEmpty(e.ErrorText))

{

// paint everything except error icon

e.Paint(e.ClipBounds, DataGridViewPaintParts.All &

~(DataGridViewPaintParts.ErrorIcon));

// now move error icon over to fill in the padding space

GraphicsContainer container = e.Graphics.BeginContainer();

e.Graphics.TranslateTransform(18, 0);

e.Paint(this.ClientRectangle, DataGridViewPaintParts.ErrorIcon);

e.Graphics.EndContainer(container);

e.Handled = true;

}

}

private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)

{

if (dataGridView1[e.ColumnIndex, e.RowIndex].ErrorText != String.Empty)

{

DataGridViewCell cell = dataGridView1[e.ColumnIndex, e.RowIndex];

cell.ErrorText = String.Empty;

cellInError = new Point(-2,-2);

// restore padding for cell. This moves the editing control

cell.Style.Padding = (Padding)cell.Tag;

// hide and dispose tooltip

if (errorTooltip != null)

{

errorTooltip.Hide(dataGridView1);

errorTooltip.Dispose();

errorTooltip = null;

}

}

}

// show and hide the tooltip for error

private void dataGridView1_CellMouseMove(object sender,

DataGridViewCellMouseEventArgs e)

{

if (cellInError.X == e.ColumnIndex &&

cellInError.Y == e.RowIndex)


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-50070-59.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...