3
$\begingroup$

Is it possible to make a popupmenu where there is text inserted into the options which you cannot choose. For instance: a popup menu with animals devided into two categories. Birds: duck, eagle, chicken. Mammals: dog, cat, cow. The strings "Birds" and "Mammals" are not supposed to be options, since you should only be able to choose the animals themselves. Since these are not options, I want them not to highlight either.

In the screenshot the category "Birds" is highlighted.enter image description here

$\endgroup$
  • $\begingroup$ You can use this: Can I disable specific items in a PopupMenu control? $\endgroup$ – Kuba May 3 '16 at 11:31
  • $\begingroup$ Thanks for your comment, but the problem is that the option is still highlighted when you hover over it. $\endgroup$ – Saida May 3 '16 at 11:43
  • $\begingroup$ Sadly that is the case. I'm not aware of any method to avoid that in PopupMenu. (I could have missed something though). Another way would be to create customized menu using undocumented features, I've started here, but haven't got time/ motivation to polish it: How to make a dynamic nested menu? $\endgroup$ – Kuba May 3 '16 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.