The chooser object is similar to the umenu object, but it displays a scrolling list of selectable items rather than a pop-up menu.
autopopulate [int] (default: 0)
When the autopopulate attribute is enabled, the chooser object updates its item list whenever the prefix attribute is set with a path or the collection or filekind attributes are set with a database query. When autopopulate is disabled, changing the object's current folder or file query has no effect on the item list. However, if you enable autopopulate after changing the prefix, collection, or filekind attributes, the item list will immediately update.
bgcolor [4 floats]
Sets the background color of one of the chooser object's rows in RGBA format. The other row background color is set by the stripecolor attribute.
collection [symbol] (default: )
When the collection attribute is set to a collection name, the item list will be populated with the names of files contained in the named collection. You can define a collection of files using the File Browser.
depth [int] (default: 0)
If the value of depth is 0, only the files contained in the folder specified by prefix will be added to the item list. If depth is greater than zero, then items in subfolders of the prefix folder will be added to the list, with the folder names(s) prepended to them. Items in subfolders up to the level specified by the depth attribute are included.
enabledrag [int] (default: 1)
When the enabledrag attribute is enabled, you can drag a named file item in the list to any Max object that accepts it (such as a playlist~).
factorycontent [int] (default: 0)
When the factorycontent attribute is enabled, files added to the chooser via the use of the collection or filekind query will include example files that ship with the Max application.
filekind [symbol] (default: )
The filekind attribute permits you to build a list of chooser items containing all files of a specified type currently present in Max's search path. In order for the filenames to appear, the autopopulate attribute must be enabled.
filtertext [symbol] (default: )
The filtertext attribute defines a text filter that modifies the list populated by the prefix, collection, or filekind attributes. Only files that contain the text in filtertext will be included in the chooser object's list. When filtertext is empty, no filtering occurs.
headerheight [int] (default: 0)
The headerheight attribute sets the height of the chooser object's header in pixels. By default the height is zero and the header is not shown.
headerlabel [symbol] (default: )
The items attribute is used by the inspector to set the text of all the items in the list after you edit them. However, when changing this attribute with a message, you can only set the first item, so we recommend using a message followed by a series of messages to set a list of multiple items.
margin [int] (default: 0)
The margin attribute sets the left and right text margins used when drawing the item text. When the margin attribute is 0, the object draws the text using a default margin equal to 80% of the currently used font's height.
When multiselect is enabled, the chooser object permits a user to select more than one item at a time by shift-clicking or command / control clicking. In addition, the multiselect attribute modifies how the chooser object sends selected items out its outlets. The first and third item index outlets will send the message followed by a list of one or more indices for each of the selected items. The second and fourth item contents outlets send the message followed by a list of one or more symbols with the contents of each of the selected items.
parameter_mappable [int] (default: 1)
When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature.
prefix [symbol] (default: )
The prefix attribute specifies a file path that will be used to populate the list of items. A file will be included in the list if its name contains the text of the current value of the filtertext attribute and its type is included in the types specified by the types attribute. In addition the depth attribute controls whether files contained within any subfolders of the prefix folder are listed. In order for the contents of the folder designated by prefix set the item list, the autopopulate attribute must be enabled.
prefix_mode [int] (default: 0)
The prefix_mode attribute controls how the chooser object outputs the path location of a chosen filename when using prefix to list the contents of a folder.
0 = 'Concatenate'
The file name is combined with its containing folder name to create a single complete path name.
1 = 'Prepend'
The containing folder name is output as a separate symbol followed by the file name. This prefix mode cannot be used when multiselect is enabled.
2 = 'Ignore'
Only the file name is output.
preview [int] (default: 0)
When the preview attribute is enabled, the chooser object shows a play button the to left of each item. If you connect the fifth outlet of chooser to an object that can play the type of file displayed in the list (sfplay~, jit.movie, or jit.playlist, clicking the play button next to an item will send commands to the connected object to begin playing the file specified by the item.
selectedclick [int] (default: 0)
When selectedclick is enabled, clicking on an already selected item reports that item. Otherwise items are only reported when the selection changes.
selectioncolor [4 floats]
Sets the background color of the chooser object's currently selected item in RGBA format. A custom background color for the selected item is only displayed if the useselectioncolor attribute is enabled.
showdotfiles [int] (default: 0)
Toggles the display of a any files whose names begin with a dot (period). The display of these files is normally supressed.
stripecolor [4 floats]
Sets the second (alternating) background row color in RGBA format. The other row background color is set by the bgcolor attribute.
style [symbol] (default: )
Sets the style to be used for the chooser object's visual display.
textcolor [4 floats]
Sets the text color of the chooser object in RGBA format.
The types attribute is used in conjunciton with the prefix attribute. It permits filtering files contained in the prefix folder according to one or more types. The types are four-character type codes as those used by the folder object such as AIFF, WAVE, TEXT, and JSON.
useselectioncolor [int] (default: 0)
Toggles the use of the selectcolor attribute to define a custom selection color.
Common Box Attributes
"items" : [ "hank", "carol", "andreas", "roland" ]