Function Repository Resource:

InteractiveListSelector

Source Notebook

Interactively select elements of a one-dimensional list

Contributed by: Lou D'Andria and Stephen Wolfram

ResourceFunction["InteractiveListSelector"][{lbl1val1,lbl2val2,}]]

interactively picks out elements from a list of rules.

ResourceFunction["InteractiveListSelector"][f,list]

maps f to list to generate the list of rules.

Details and Options

In the list of rules {lbl1val1,lbl2val2,}, lbli corresponds to the expression displayed on the selector, and vali is the expression stored as a selection.
Clicking the Add button under an item will include the item in the selection.
Clicking the Copy button will copy any selected elements to the clipboard.
Clicking the Clear button will clear any currently selected elements.
The following options can be given:
ParallelizationFalsewhether to use parallelization
PerformanceGoal$PerformanceGoalaspects of performance to optimize
Possible settings for PerformanceGoal include $PerformanceGoal, "Quality" and "Speed". With the "Quality" setting, a dynamic interface is used, which can potentially consume more memory for large lists. With the "Speed" setting, a simpler selector is used.

Examples

Basic Examples (2) 

Interactively pick out a list of pictures:

In[1]:=
ResourceFunction["InteractiveListSelector"][Thumbnail, ExampleData /@ RandomSample[ExampleData["TestImage"], 5]]
Out[2]=

Click on the Add button to add pictures to the selection, the Copy button to copy the selection to the clipboard and the Clear button to clear the selection. Paste the copied selection here:

Scope (2) 

Directly give a list of rules to InteractiveListSelector:

In[3]:=
ResourceFunction["InteractiveListSelector"][
 Table[Graphics[{c, Rectangle[]}, ImageSize -> Tiny] -> c, {c, RandomColor[10]}]]
Out[3]=

Supply a function and a list instead:

In[4]:=
ResourceFunction["InteractiveListSelector"][
 Rasterize[ExampleData[#, "MeshRegion"], ImageSize -> 150] &, {{"Geometry3D", "StanfordBunny"}, {"Geometry3D", "VikingLander"}, {"Geometry3D", "Horse"}, {"Geometry3D", "Phobos"}, {"Geometry3D", "Galleon"}}]
Out[4]=

Options (2) 

Setting PerformanceGoal to "Quality" uses a Dynamic interface, which may be slower for large lists:

In[5]:=
ResourceFunction["InteractiveListSelector"][
 Table[Style["\[FilledSquare]", c, 60] -> c, {c, RandomColor[15]}], PerformanceGoal -> "Quality"]
Out[5]=

Setting PerformanceGoal to "Speed" uses a non-Dynamic interface, which is simpler-looking but more responsive, for large lists:

In[6]:=
ResourceFunction["InteractiveListSelector"][
 Table[Style["\[FilledSquare]", c, 60] -> c, {c, RandomColor[15]}], PerformanceGoal -> "Speed"]
Out[6]=

Version History

  • 2.0.0 – 18 March 2020
  • 1.0.0 – 04 December 2019

License Information