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.
Unfortunately, activation email could not send to your email. Please try again.

Change the color of the drag & drop dotted rectangle with own mouse controller

Thread ID:

Created:

Updated:

Platform:

Replies:

61704 May 31,2007 03:35 AM Jun 1,2007 07:59 PM Windows Forms 3
loading
Tags: GridControl
Daniel Dusek
Asked On May 31, 2007 03:35 AM

Hi,
My problem : I want to change the color of the target dotted rectangle which appears when you drag the cell. I want to use my own mouse controller.

I have posted this question already, but the answer I have got was not helpfull enough.

I am looking for the following code sample :
MouseController\GridDragSelectMouseController.cs
Can you send me the sample, or a link to it?

Thank you!
Regards Dan Dusek

haneefm [Syncfusion]
Replied On May 31, 2007 06:06 PM

Hi Dan,

Here is a minimal sample that show you "How to change the drag and drop dotted rectangle with own mouse controller?" . Please try the attached sample and let me know if this helps.
http://websamples.syncfusion.com/samples/Grid.Windows/ChangeCursorANDDragRectangle/main.htm

Best regards,
Haneef

Daniel Dusek
Replied On June 1, 2007 11:08 AM

Hi Haneef,
thank you sor far for your help.
I use my own mouse controller. The drag&drop cursor has to have a different color, so in the HitTest the position of the mouse cursor is tested and if it is on the position, where the grids drag&drop cursor would appear normally, my new cursor apperes.

But then I need that the drag&drop operation starts (I just changed the D&D cursor, but the D&D operation must be performed). It does not work in your example es well. If the custom leaf-cursor appears, then the cell can't be dragged. The drag&drop events are not cached by the mouse controller. How can I handle this? Can/should I call the drag&drop operation of the grid from my mouse controller?

So once more my problem : I need to change the drag&drop mouse cursor to my own (this is done already), then to perform normal drag&drop operation (does not work at all) and during dragging, I need that the color of the target rectangle is changed to more visible color (red).

Thank you, regards Dan

haneefm [Syncfusion]
Replied On June 1, 2007 07:59 PM

Hi Dan,

One way you can do this by derving the GridDragSelectMouseController class and overide cursur property to change the your cursur. You would have to remove the old controller and register your derived one with code like:

IMouseController controller = this.grid.MouseControllerDispatcher.Find("DragSelect");
this.grid.MouseControllerDispatcher.Remove(controller);
this.grid.MouseControllerDispatcher.Add(new MyGridDragSelectMouseController(this.grid));

Best regards,
Haneef

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.

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.

;