We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change cursor when move over a cell with text.

Thread ID:

Created:

Updated:

Platform:

Replies:

36162 Oct 21,2005 09:15 AM UTC Oct 21,2005 02:46 PM UTC WinForms 5
loading
Tags: GridControl
Iain Jolly
Asked On October 21, 2005 09:15 AM UTC

Hi, I am trying to change the mouse cursor when I move over a cell that contains text within a specific column. Thanks Iain

Administrator [Syncfusion]
Replied On October 21, 2005 12:27 PM UTC

The grid uses a mouse controller architecture to control cursors. There are two ways you can change the cursor. One is to implement your own mouse controller, and the other is to derive the grid, and override OnSetCursor. Here is a forum thread that has samples for both techniques. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=8551

Administrator [Syncfusion]
Replied On October 21, 2005 12:44 PM UTC

Another way to handle this is to use a custom cell type that controls the cursor over teh column. The 3.3.0.0\Windows\Grid.Windows\Samples\In Depth\DerivedCellControlTutorial sample that is discussed in the user''s guide changes the cursor over links. You could try something similar.

Iain Jolly
Replied On October 21, 2005 01:53 PM UTC

Thanks for the fast response. I am still having problems though as I can''t get it to work. The event is definately handled but the cursor does not change. Thanks Iain private void dgInvoicesMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { int row; //row that the mouse is currently over. int col; //column that the mouse is currently over. //Get the row, column point where the users mouse is and process. if (dgInvoicesMain.PointToRowCol(new System.Drawing.Point(e.X,e.Y),out row,out col)) { if(col==2) { this.Cursor = Cursors.Hand; } } }

Administrator [Syncfusion]
Replied On October 21, 2005 02:20 PM UTC

Handling mousemove in the grid was not one of the suggested methods. That will not work. You will have to use one of the three techniques suggested above to change the cursor in a grid.

Iain Jolly
Replied On October 21, 2005 02:46 PM UTC

Sorry....I have the correct code now. Rushing to meet a deadline and didn''t read the answer. Thanks for the help. Works a treat.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;