Wolfram Research

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:
Parallelization False whether to use parallelization
PerformanceGoal $PerformanceGoal aspects 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

Interactively pick out a list of pictures:

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

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

Directly give a list of rules to InteractiveListSelector:

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

Supply a function and a list instead:

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

Options

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

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

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

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

Resource History

License Information