Click, click + shift

Is there a way to prototype the operative-system-like selection of folders?

  1. Click on the first element selects one element.
  2. Shift click on an element five elements below it, selects those five elements, including the first and the last clicked one.

here a little example which uses a click-handler on a container containing “folder”-widgets with two states (Normal and Selected):

selection.zip (996.1 KB)

The script works if the “container” contains only widgets of the same type with Normal and Selected-State.

Does this help?

1 Like

Thanks!!
It would be perfect if after have multiple selected elements you were be able to deselect just the clicked one with CTRL + click. Is this possible?

here a version with ⌘-click or control-click to toggle the selected state:

:thinking: I only tried it on a mac (which shows the context-menu for control-click), hopefully ctrl-works on a PC …

selection2.zip (997.2 KB)

1 Like

On Mac, you use cmd. Works at my end.

1 Like