How to disable an item in ComboBox


#1

Hi All,
I am trying to disable an item in a ComboBox using setItemEnabled(itemId, shouldbeEnabled) API. But its not working for me.
I am using JUCE version 2.0.31. It will be really great if anyone can help me out in this.

Thanks in advance :slight_smile:
Regards,
Vinay


#2

What about just not adding the item? Not showing an item that you can’t use from a list seems more straightforward as far as design goes, imho.


#3

The requirement is like I have disable the item in ComboBox on runtime depending on some condition. So I have to add the item.


#4

[quote=“vinay”]I am trying to disable an item in a ComboBox using setItemEnabled(itemId, shouldbeEnabled) API. But its not working for me.
I am using JUCE version 2.0.31. It will be really great if anyone can help me out in this.
[/quote]

setItemEnabled works fine here with JUCE 2.0.38. Try harder. :wink: