Changing Cursor property in a ListView Control

G

Guest

Hi
I would to display a Cursors.WaitCursor on a ListView control, so I tried

listView.Cursor = Cursors.WaitCursor

but it doesn't work at all, I see always the default cursor. The same thing happens if I set the WaitCursor in the properties window. The strange thing is that with other controls, like buttons or the treeview, it does work. It does not work even if I set the current cursor property with the line

Cursor.Current = Cursors.WaitCursor

Any ideas? Is it a bug of the ListView control? Must I set some other properties of the ListView control to change the cursor

Best regards
Riccardo
 
C

ClayB [Syncfusion]

Here is a FAQ entry showing how you can control the cursor over a Widnows
Forms DataGrid by deriving the grid, overriding WndProc and handlingteh
WM_SETCURSOR message yourself. Maybe the same technique will work for the
ListView.

George Shepherd's Windows Forms FAQ contains an entry entitled:

How can I control the cursor over my DataGrid?

Check it out at:
http://www.syncfusion.com/faq/winforms/search/1135.asp

=============================================
Syncfusion, Inc.
visit http://www.syncfusion.com for .NET Essentials



Riccardo Giomi said:
Hi,
I would to display a Cursors.WaitCursor on a ListView control, so I tried:

listView.Cursor = Cursors.WaitCursor;

but it doesn't work at all, I see always the default cursor. The same
thing happens if I set the WaitCursor in the properties window. The strange
thing is that with other controls, like buttons or the treeview, it does
work. It does not work even if I set the current cursor property with the
line:
Cursor.Current = Cursors.WaitCursor;

Any ideas? Is it a bug of the ListView control? Must I set some other
properties of the ListView control to change the cursor?
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?UmljY2FyZG8gR2lvbWk=?= said:
Hi,
I would to display a Cursors.WaitCursor on a ListView control, so I tried:

listView.Cursor = Cursors.WaitCursor;

but it doesn't work at all, I see always the default cursor. The same thing happens if I set the WaitCursor in the properties window. The strange thing is that with other controls, like buttons or the treeview, it does work. It does not work even if I set the current cursor property with the line:

Cursor.Current = Cursors.WaitCursor;

Any ideas? Is it a bug of the ListView control? Must I set some other properties of the ListView control to change the cursor?

That's a known but of the listview control that is AFAIK fixed in the
next version of the .NET Framework.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top