开发者

What's the difference between CellClick and CellMouseClick?

Is it only in the event arguments that get passed into the event handler?

i know you can get which button made the click in the mouse event, but is that th开发者_C百科e only difference?


The CellClick event does not receive information about the mouse position. If the event handler needs information about the mouse position, use the CellMouseClick event.

See here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellclick(VS.80).aspx


Exact same kind of difference as between a control's Click and MouseClick events. The Click event can also be generated by the keyboard. For example when the user presses the space bar when a button has the focus.

Very similar for DataGridView, OnCellClick can be raised when the column contains a Button, CheckBox or link. Necessarily there is no mouse info, the cursor could be anywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜