C#获取ListView鼠标下的Item实例
作者:jingxian 时间:2023-04-29 11:45:10
ListView在虚模式下,CheckBox无法点击,可以用此方法实现
private void lvwTitle_MouseDown(object sender, MouseEventArgs e)
{
Point curPos = this.lvwTitle.PointToClient(Control.MousePosition);
ListViewItem lvwItem = this.lvwTitle.GetItemAt(curPos.X, curPos.Y);
if (lvwItem != null)
{
lvwItem.Checked = !lvwItem.Checked;
lvwTitle.Refresh();
}
}
标签:listview,item,c#
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
mybatis 字段名自动转小写的实现
2021-09-09 20:04:26
idea在用Mybatis时xml文件sql不提示解决办法(提示后背景颜色去除)
2023-11-09 01:45:51
![](https://img.aspxhome.com/file/2023/0/59250_0s.png)
springboot整合mybatis实现简单的一对多级联查询功能
2023-11-07 13:30:22
![](https://img.aspxhome.com/file/2023/5/72415_0s.png)
C#将html table 导出成excel实例
2023-12-20 04:58:55
Spring @Conditional通过条件控制bean注册过程
2023-08-06 10:00:11
C# 时间与时间戳互转的方法(13位)
2023-12-04 10:26:39
SpringBoot之@Value获取application.properties配置无效的解决
2023-09-15 22:37:55
分享我在工作中遇到的多线程下导致RCW无法释放的问题
2022-10-14 21:07:29
unity scrollRect实现按页码翻页效果
2021-10-11 11:52:43
![](https://img.aspxhome.com/file/2023/2/79132_0s.gif)
linux的shell命令检测某个java程序是否执行
2021-07-27 14:32:20
C#实现利用泛型将DataSet转为Model的方法
2023-09-12 13:32:26
Maven工程打包jar的多种方式
2022-12-15 06:54:46
![](https://img.aspxhome.com/file/2023/6/67686_0s.png)
Spring Security安全框架之记住我功能
2023-08-19 02:38:43
![](https://img.aspxhome.com/file/2023/1/89481_0s.png)
Spring Boot + Mybatis 实现动态数据源案例分析
2023-05-15 12:13:47
![](https://img.aspxhome.com/file/2023/0/77440_0s.png)
List转换成DataSet实现代码
2023-03-02 04:46:01
Input系统按键事件的分发处理示例详解
2023-05-05 03:15:17
Java中简单实用Quartz概述
2021-09-09 14:16:30
Android学习之使用SharedPreferences存储应用程序数据
2023-09-09 14:00:41
![](https://img.aspxhome.com/file/2023/0/138920_0s.jpg)
SpringBoot如何优雅的整合Swagger Api自动生成文档
2022-08-10 00:49:29
![](https://img.aspxhome.com/file/2023/3/72343_0s.png)
Java虚拟机内存结构及编码实战分享
2023-11-29 13:47:47
![](https://img.aspxhome.com/file/2023/8/59518_0s.png)