473,511 Members | 10,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing mouse cursor over certain DataGrid columns

How can I customize DataGrid so that when the mouse hovers over certain
columns the cursor changes to the Cursors.Hand cusror? I was unable to use
the MouseEnter/MouseLeave events on DataGrid itself because those events do
not use the MouseEventArgs, so I can't get the X Y position to determine if
the cursor should change for that column
Nov 16 '05 #1
1 2784
MrNobody,

Use the MouseMove event handler. This will give you the X and Y
coordinates of the mouse in relation to the grid.. Once you have those, you
can call HitTest to determine which cell it is over. With that information,
you can set the cursor.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MrNobody" <Mr******@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
How can I customize DataGrid so that when the mouse hovers over certain
columns the cursor changes to the Cursors.Hand cusror? I was unable to use
the MouseEnter/MouseLeave events on DataGrid itself because those events
do
not use the MouseEventArgs, so I can't get the X Y position to determine
if
the cursor should change for that column

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3419
by: Geoff Soper | last post by:
I'm trying to dynamically change the cursor of a couple of maps over an image. Basically the image is in an online photo system where there is a rotate mode. In this mode clicking on the left or...
3
3430
by: Tim | last post by:
Hi, How would I go about changing the windows mouse cursor ? (Not the mouse cursor on a form...but the actual mouse cursor in windows..) Any ideas would be greatly appreciated Thanks, Tim
1
1541
by: John Paul. A (MCP ID# 3015176) | last post by:
Hi, In a ASP.NET page I have a DataGrid Control populated with some data. I want to resize the DataGrid columns using mouse. That is, when I move the cursor to the edge of a column, the cursor...
15
1498
by: Dave | last post by:
I have a page that, when invoked, it runs a while (~ 15 seconds), then displays a DataGrid control. What I want to accomplish is to have the mouse pointer go to 'wait', then after the control...
3
4851
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a...
2
9016
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
5
1958
by: Mudcat | last post by:
I was trying to design a widget that I could drag and drop anywhere in a frame and then resize by pulling at the edges with the mouse. I have fiddled with several different approaches and came...
2
2348
by: Dom | last post by:
I need to change the cursor when the mouse is hovering over certain cells in a DataViewGrid, as a visual aid for the user. But the cursor is not something found in the Cursors Class. I have a...
0
1966
by: IanWright | last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then...
0
7251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7089
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.