#14940 closed defect (fixed)

Header control dragging not draggable columns is possible

Reported by: jobuz Owned by:
Priority: normal Milestone:
Component: wxMSW Version: stable-latest
Keywords: header control dragging columns Cc:
Blocked By: Blocking:
Patch: yes


The behaviour can be seen in the dataview sample.
Open page "MyMusicTreeModel" and try to drag the first column "title" over the other columns. You can see some artefacts in the header control and it is possible to move column "title" to another position. This is because we receive the item corresponding to the column the mouse points to. If they are draggable the event get not vetoed and so it is possible to move not draggable columns. The attached patch fixes this.

Attachments (1)

headerctrl.patch download (2.4 KB) - added by jobuz 23 months ago.

Download all attachments as: .zip

Change History (4)

Changed 23 months ago by jobuz

comment:1 Changed 23 months ago by jobuz

  • Version set to 2.9-svn

comment:2 Changed 22 months ago by vadz

Thanks, I'll apply the patch, but I actually don't really understand what's going on here -- do we really get multiple HDN_BEGINDRAG events? If so, shouldn't we ignore all the subsequent ones to avoid generating more than one wxEVT_COMMAND_HEADER_BEGIN_REORDER event?

comment:3 Changed 22 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [73389]) Fix bug with dragging non-draggable columns in wxMSW wxHeaderCtrl.

Properly ignore HDN_BEGINDRAG events for the columns without wxCOL_REORDERABLE
flag. This fixes dragging non-draggable columns in wxDataViewCtrl under MSW.

Closes #14940.

Note: See TracTickets for help on using tickets.