现在想实现如下效果:当鼠标移动到cell的内容(一般就是text文本啦)上的时候,把字体放大一号,或者把鼠标指针放大一号
要求:1.鼠标在cell空白地方的时候,不发生任何改变
2.不要用C#的LinkCell,要用自定义的cell类(继承于donet的cell类)来实现ps:不要说把整个girdview的字体全部放大一号。-_-!!!
要求:1.鼠标在cell空白地方的时候,不发生任何改变
2.不要用C#的LinkCell,要用自定义的cell类(继承于donet的cell类)来实现ps:不要说把整个girdview的字体全部放大一号。-_-!!!
解决方案 »
- C# 窗口2中的按钮调用窗口1中的按钮的方法
- 关于C#中的List<>和WPF中的listview
- TransactionScope递归调用问题
- 帮忙:读取网络接口XML出错(循环在第二次出错)
- 救命阿!控件AxWebBrowser中DocumentComplete为什么触发不了??
- Winform读取Word 内容并保存成PDF用itextsharp怎么实现
- 未能加载文件或程序集“C:\Program Files (x86)\DevExpress 2011.1\Components\Sources
- InstallShield制作静默更新包
- 老问题,可我已经从新装了一遍.NET了,而且我保证是中文版本的。可还是出现相同的提示,怎么办阿?
- 请叫高手,c#中是否有类似于sprintf函数?谢谢
- Windows服务操作注册表问题
- c# winform 自定义Image属性
private void dataGridView1_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Rows.Count > 0 && e.RowIndex!=-1)
{
if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
{
if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() != "")
{
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.Font = new Font("宋体", 15);
}
}
}
} private void dataGridView1_CellMouseLeave(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Rows.Count > 0 && e.RowIndex != -1)
{
if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
{
if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() != "")
{
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.Font = new Font("宋体", 12);
}
}
}
}
自己现做的 ,测试成功
不满足要求1我的意思是说:假如这个cell宽为200,但是里面只有一个数字“1”,那么这个cell里面肯定有很多空白的地方,要求鼠标只有在数字“1”上面的时候才发生改变,在空白的地方不变。而不是空白的没有值的cell