怎么在datagridview中鼠标移动到不同行时鼠标显示说明框
答案:5 悬赏:0
解决时间 2021-04-09 07:46
- 提问者网友:夜微涼
- 2021-04-08 21:39
private void dataGridView1_CellMouseEnter(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex > -1 && e.RowIndex > -1) { toolTip1.SetToolTip(dataGridView1,dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString()); } }这样写怎么没有反应。。winform里的。。求高手
最佳答案
- 二级知识专家网友:嗷呜我不好爱
- 2021-04-08 22:20
默认就可以了,默认情况下如果一行显示不完所有内容,鼠标指向任何单元格都有提示.
全部回答
- 1楼网友:情战凌云蔡小葵
- 2021-04-09 02:08
加一个label 指定label位置为当前鼠标位置 显示对应currentcell的提示内容
- 2楼网友:桃花别处起长歌
- 2021-04-09 02:01
引用 3 楼 的回复:加一个label 指定label位置为当前鼠标位置 显示对应currentcell的提示内容这样不是很美观,,
- 3楼网友:浪者不回头
- 2021-04-09 00:52
dataGridView1.Rows[i].Cells[0].ToolTipText = dataGridView1.Rows[i].Cells[1].Value.ToString();我知道。。这个。。大家进来拿分把。。还有好的方法也请说
- 4楼网友:猖狂的痴情人
- 2021-04-08 23:57
如果内容很多提示最好用控件显示比较全面看到全部内容
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯