English 中文(简体)
Treat Point as CTRL+clicks in ListView
原标题:Treat clicks as CTRL+clicks in ListView

我对多功能和详细的看法有多栏清单控制。 当用户点击名单上的任何项目时,我想将其视作CTRL+clicked在该项目上。 因此,如果他们点击一个已经选定的项目,就会放弃。 或者,如果它们选择第二个项目,它将选择该项目而不忽略其他选定项目。 用于“卫星式”仪器,通过触摸屏进行投入,用户可能或无法使用键盘。

问题回答

可以通过处理<代码>MouseUp事件和使用<代码>Hit 测试来检查点击哪项物品。 然后确定该项目的某些财产:

item.Selected ^= true

You may also check out freeware component Better ListView Express from ComponentOwl. It has powerful owner drawing that allows you to display items in any state. It also allows you to customize height of items. The full version offers even more interesting features.

您可考虑使用<代码>ListBox,而采用老板抽取的方式。

以及





相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签