Ticket #15082 (reopened defect)

Opened 4 months ago

Last modified 4 months ago

Should wxDataViewCtrl unselect items when clicking on a blank area?

Reported by: Christopher Wright Owned by:
Priority: low Milestone:
Component: GUI-generic Version: 2.9-svn
Keywords: wxDataViewCtrl unselect click Cc:
Blocked By: Patch: no
Blocking:

Description

What happens
Clicking on a 'blank' area (e.g. below all the rows) does not change which items are selected. This can be seen using the standard Data View sample.

What should happen
Under Windows (not sure about other ports) the wxDataViewCtrl should follow the standard behaviour of unselecting items when the mouse is clicked (left or right) on a blank area.

I have attached a patch to fix this.

Attachments

dataview_unselect.patch download (1.1 KB) - added by Christopher Wright 4 months ago.
Patch to fix defect

Change History

Changed 4 months ago by Christopher Wright

Patch to fix defect

  Changed 4 months ago by VZ

  • status changed from new to closed
  • resolution set to fixed

(In [73602]) Unselect all wxDataViewCtrl items when clicking outside of the item area.

This is consistent with Windows behaviour and as the generic wxDataViewCtrl is
mostly used under Windows, it makes sense to follow Windows convention in it.

Closes #15082.

follow-up: ↓ 3   Changed 4 months ago by rk

  • status changed from closed to reopened
  • resolution deleted

Looking at some prominent examples on my windows system it seems that it is not really consistent with Windows behaviour to unselect items this way. The tree view of the Solution Explorer in Visual Studio does not do it. The history pane of the Internet Explorer does not do it either. The only place I could actually see this unselecting was in the right pane of the Windows Explorer. The left pane showing the directory tree does not unselect its items as well. It seems that there is no consistent way in Windows. ;-)

The question now is if the new behaviour is better than the old. It certainly changes my application. I now have to be careful to not click in the empty space and kill my selection by accident.

in reply to: ↑ 2   Changed 4 months ago by Christopher Wright

Replying to rk:

Looking at some prominent examples on my windows system it seems that it is not really consistent with Windows behaviour to unselect items this way. The tree view of the Solution Explorer in Visual Studio does not do it. The history pane of the Internet Explorer does not do it either. The only place I could actually see this unselecting was in the right pane of the Windows Explorer. The left pane showing the directory tree does not unselect its items as well. It seems that there is no consistent way in Windows. ;-)

Well I think you have come to the conclusion that Windows is inconsistent, but then asserted that the current behaviour is somehow better. I personally believe that most users experience of Windows is with file icons and possibly list views in the Explorer pane, which do exhibit the unselect behaviour. Additionally, I think that wxListView also has this unselect behaviour.

However, I do agree that changing functionality is a bad thing in general, and also in this specific case I agree that it may break existing applications. That is why I originally suggested to have the behaviour configurable via a style option, with the old behaviour as a default. I did solicit suggestions on my original question on wx-users mailing list ( https://groups.google.com/forum/?fromgroups=#!topic/wx-users/m2iVA7qkxSE), but perhaps that was not the correct forum for discussing specifics of patches. I am new to this community so I don't really know what the correct procedure is, and I thought I was following it according to the information in  http://wxwidgets.org/develop/.

I am happy to revise the patch to add the behaviour as an option, passed in through the style flag. Please let me know if that will be acceptable.

  Changed 4 months ago by ChristopherWright

Apparently there is a bug with the Trac email system when a username contains a space, so just posting this to trigger emails that might work.

  Changed 4 months ago by vadz

  • priority changed from normal to low
  • summary changed from wxDataViewCtrl should unselect items when clicking on a blank area to Should wxDataViewCtrl unselect items when clicking on a blank area?
  • patch unset

I tried to find something about this in Microsoft UI guidelines but failed so I'm still not sure what to do about this. IMHO we should leave the new behaviour on for now as the RHS of the Explorer window does come the closest to what wxDVC is supposed to be but if anybody can find objective arguments against doing it (or for...) I'd be definitely interested.

Note: See TracTickets for help on using tickets.