Text List deselect

In my original Pan 6 file, I have a Text List displaying an array of text items, and I can CMD-click to select multiple items. I can also CMD-click to Deselect a selected item.

In Pan X, the text list is working correctly, except that I cannot Deselect a selected item. CMD-click will select items as before, but will not Deselect. I do have Allow Multiple Rows and Allow Empty turned on.

Is there some way to Deselect Text List items in Pan X?

Here is my recent post on the same issue:

There were no responses to my post.

I came up with a method to delete any existing selection that is clicked again while selected. I tried to work it out so that you could use this procedure for multiple Text List Objects. You would put a call to this procedure in the Procedure pane of the Properties panel along with two parameters. The first parameter is the variable that contains the current selections from the list. This variable is quoted because we need the name of the variable and we’ll get the value in the called procedure. The second parameter is the variable that fills the list. You might have to assign a fileglobal variable for this if the list uses a formula to fill the contents. Your Procedure pane code would look something like this where .SelectMonitor is the name I gave my called procedure:

call .SelectMonitor,“mySelection”,listContent

This is the code in the called procedure:

define previousSelection,""
let paramOne=parameter(1)
let currentSelection=datavalue(parameter(1))
if currentSelection="" rtn endif
If currentSelection=previousSelection
    let itemValue=array(parameter(2),info("matrixrow"),cr())
    currentSelection=arraydeletevalue(currentSelection, itemValue, cr())
    setfilevariable "",paramOne,currentSelection
execute {showvariables }+paramOne

The first line of code checks to see if there is a variable previousSelection and creates it set to “” if it is not already defined. The second line gets the name of the variable that contains the current selections. The third line gets the value of this variable. The next line checks to see if the current selection is empty and returns from the call if it is.

The fifth line checks to see if the current selection is the same as the previous selection which would mean one of the existing selected rows was clicked again. If true, we get the value of the clicked row using info(“matrixrow”) to extract it from the list contents in parameter(2). Next we delete that element from the list of selected items. Lastly we reset the value of the original selection variable to the new value of currentSelection. The following line updates the value of previousSelection to the currentSelection and the penultimate line forces the Text List to update the new selections and finally at the end returns from the call.

Here is what it looks like in action…


1 Like