ListCtrl - click to select, click to deselect

Hi,

I’d like a user to be able to multi-select a ListCtrl by simply clicking on multiple rows (instead control-clicking succeeding rows), and that clicking on the succeeding rows doesn’t deselect the currently selected row(s).

Any suggestions? Do I have to intercept the mouse event (EVT_LEFT_UP), determine the corresponding row target, and control the UI at that level, or is there a more straightforward approach?

Thanks,

Rich

Yes — don’t do it.

The ADVANTAGE of using a standard control is that it is familiar to users. They know how it works, because they’ve used them in other applications. When you see a ListCtrl, you know that you multi-select using Ctrl-Click.

If you make your custom version, how would I change my mind and start over? Do I have to go re-click every option I’ve already selected in order to deselect it? That’s not how the standard controls are designed.

···

On Oct 18, 2014, at 8:15 AM, Rich K richknopman@gmail.com wrote:

I’d like a user to be able to multi-select a ListCtrl by simply clicking on multiple rows (instead control-clicking succeeding rows), and that clicking on the succeeding rows doesn’t deselect the currently selected row(s).

Any suggestions?

Tim Roberts, timr@probo.com

Providenza & Boekelheide, Inc.

I personally have to agree with Tim, isf you would like a list
control that behaves as described then simply replace your list
control with a check list control, this will then be familiar to the
users.
Gadget/Steve

···

On 18/10/14 21:28, Tim Roberts wrote:

On Oct 18, 2014, at 8:15 AM, Rich K <richknopman@gmail.com >
wrote:

          I'd like a user to be able to multi-select a ListCtrl

by simply clicking on multiple rows (instead
control-clicking succeeding rows), and that clicking on
the succeeding rows doesn’t deselect the currently
selected row(s).

Any suggestions?

Yes — don’t do it.

      The ADVANTAGE of using a standard control is that it is

familiar to users. They know how it works, because they’ve
used them in other applications. When you see a ListCtrl, you
know that you multi-select using Ctrl-Click.

      If you make your custom version, how would I change my mind

and start over? Do I have to go re-click every option I’ve
already selected in order to deselect it? That’s not how the
standard controls are designed.

Tim Roberts, timr@probo.com

Providenza & Boekelheide, Inc.

  --

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

Thanks Tim and Gadget Steve, I see your point.

I do essentially want a checklist, though I need the multiple columns of a ListCtrl (I guess like a gui email client). For the “start over” scenario, I was going to put “select all” and “clear all” buttons at the top of the control, in the same way as is usually done for a list of checkboxes.

So I can use the ListCtrl with the traditional behavior. My frustration with that is, if I select a bunch of rows then accidentally click anywhere in the ListCtrl, I lose all my selections and have to start over.

But I also found a CheckListCtrlMixin for use with ListCtrl. This selection mechanism is less fragile than ctrl-clicking a bunch of rows. gmail uses this convention in their browser ui. I think I’ll use that.

Thanks again for the advice.

Rich

···

On Saturday, October 18, 2014 11:15:35 AM UTC-4, Rich K wrote:

Hi,

I’d like a user to be able to multi-select a ListCtrl by simply clicking on multiple rows (instead control-clicking succeeding rows), and that clicking on the succeeding rows doesn’t deselect the currently selected row(s).

Any suggestions? Do I have to intercept the mouse event (EVT_LEFT_UP), determine the corresponding row target, and control the UI at that level, or is there a more straightforward approach?

Thanks,

Rich

I wonder if the mixin you found does essentially what you were describing, except with the addition of the checkbox row icon…

Thanks for bringing this up, seems useful so I’m glad to know it’s around!

···

On Sunday, October 19, 2014 2:35:58 PM UTC-7, Rich K wrote:

Thanks Tim and Gadget Steve, I see your point.

I do essentially want a checklist, though I need the multiple columns of a ListCtrl (I guess like a gui email client). For the “start over” scenario, I was going to put “select all” and “clear all” buttons at the top of the control, in the same way as is usually done for a list of checkboxes.