Cabbage Logo
Back to Cabbage Site

Get trigger by click and not by value change in a listbox

Is there a way to get a trigger when a user double clicks on an item in a listbox? If I see this correctly a trigger is only generated with SValue, kTrig cabbageGetValue "listbox" for kTrig if the value in the listbox changes. But I am looking for a way to click on the same value several times and get a trigger each time. Is that possible? Perhaps by resetting the value or something similar? Thank you very much!

I don’t think this is possible, however, I do recall implementing this for the combo boxes, or at least trying to implement it. I’m not on a machine with Cabbage right now, but can you test with a combo box and see if you can select the same item again? If so I can use the same mechanism for the list box (in theory at least…)

Many thanks for the quick reply. I tried it briefly with a combo box, but I also didn’t get a trigger the second time I clicked on an item.

It looks like I might be able to hack this functionality, but I’m concerned about making that change. If we want it to trigger a changed opcode, I will need to send two values to Csound. A dummy value, and the current item value. I guess I can look at adding an additional identifier for users who want this behaviour. Let me take a look.

1 Like