Using ComboBox for ValueTreeState


I am developing a Juce Plug-In and I’m using the ValueTreeState for my parameters. I want to use a ComboBox as one of the GUI components and store this parameter in the ValueTreeState. I see you have to populate the items in the ComboBox manually. So I created a parameter with values ranging from 1.0f to 6.0f to represent my 6 options in the ComboBox. I populated the ComboBox with the text and assigned them ItemID’s ranging from 1 to 6. I’ve been trying to link the ItemID to the parameter stored in the ValueTreeState but have been unsuccessful. First I want to check if this is possible and second, if it is, how would you accomplish this or is there another alternative to achieve what I’m trying to do?


I managed to figure this out, I had a error creating the parameter’s name so when I linked the attachment it was using a parameter that wasn’t in the ValueTreeState