OLEDrag&Drop

The place for threads about TimoSoft ExplorerListView.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: OLEDrag&Drop

Post by TiKu » 27 Feb 2013, 20:20

TiKu wrote:Dragging multiple columns is possible, but a bit complicated. I'll post code to do this later.
Ah, I have to correct myself. I thought I had allowed it at least for OLE drag'n'drop, but apparently I could not find any scenario where dragging multiple columns would be useful.

So, dragging multiple column headers at once is not possible. Maybe you can simulate it by technically dragging only the first column, but moving the other columns with it if the dragged column is dropped.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

engee30
Lt. Commander
Posts: 54
Joined: 25 Sep 2012, 19:49
Location: Swindon, UK
Contact:

Re: OLEDrag&Drop

Post by engee30 » 28 Feb 2013, 15:16

Thanks TiKu, I've used your coding for inserting columns in-between, and it works great. :)
Since it's not possible to drag more than one column at a time, I'm trying to use the same coding to stimulate that dragging event. Once I'm done with it, I'll post it here.

Cheers,
Pete

engee30
Lt. Commander
Posts: 54
Joined: 25 Sep 2012, 19:49
Location: Swindon, UK
Contact:

Re: OLEDrag&Drop

Post by engee30 » 01 Mar 2013, 11:06

Hi

While dragging columns, there's a blue line going across between the headers which appears once the dragging starts. Is there any way I could get the position of it, any coordinates or an index where it is positioned? Looks like an insertion mark, but can't figure out how to obtain that information.

And I've sometimes got a problem with autoscrolling when dropping the column after dragging - it just keeps scrolling, and I cannot stop it; it stops automatically once the horizontal scrollbar reaches either end of the listview. :?

Pete

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: OLEDrag&Drop

Post by TiKu » 01 Mar 2013, 20:43

Unfortunatly the native list view control is rather limited when it comes to drag'n'drop. You can set the insertion mark, using the SetHeaderInsertMarkPosition method. But there seems to be no way to retrieve the current position of the insertion mark.

Can you reproduce the scrolling bug? Another user has reported it, too. But so far I have not been able to reproduce it.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

engee30
Lt. Commander
Posts: 54
Joined: 25 Sep 2012, 19:49
Location: Swindon, UK
Contact:

Re: OLEDrag&Drop

Post by engee30 » 01 Mar 2013, 22:04

Hiya

Ok, I've uploaded a project I used before, tweaked a bit for the purpose of reproduction of the problem. Once you've typed in the number of columns you want to add in the text box and clicked the appropriate button, try dragging one of the columns nearest to the right edge of the listview. Keep dragging until the listview starts autoscrolling and then release the mouse button. The scrolling won't stop, whatever you do. You can manually scroll the bar till the very end of the edge in the same direction as you initially started dragging, and it will stop, however, it will start scrolling again and again if you go with the scrollbar in the opposite direction. :(
That's a real bugger.

Another problem seems to be that while dragging the columns, the headers get smeary and it's impossible to make out over which header the dragged column is - all captions disappear. :?
Attachments
ExLvwDragDrop.zip
(180.17 KiB) Downloaded 285 times

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: OLEDrag&Drop

Post by TiKu » 02 Mar 2013, 22:34

Hi Pete,

Thank you for the instructions how to reproduce this bug. It made it easy for me to fix it. I'll release a new version within the next 24 hours.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

engee30
Lt. Commander
Posts: 54
Joined: 25 Sep 2012, 19:49
Location: Swindon, UK
Contact:

Re: OLEDrag&Drop

Post by engee30 » 03 Mar 2013, 00:58

Hi TiKu

That'll be great. Waiting to get it. :)

Post Reply