0

Currently I have a comboBox with sections that the user can select. I would like to disable all the sections, but have the ability to view them. I tried using setDisable, but that wont let the user view the available sections.

This is used in a program that has steps. The user would be able to see what step they are on, but not be able to change their step. However an admin that wants to test the program should have the ability to freely select whatever step they want.

How can I achieve this? Is there a better element to use?

benjinne
  • 47
  • 11
  • So, what have you attempted to do ? , and what is not working specifically ? – Irf Jul 11 '17 at 18:24
  • Iused a comboBox called sections then sections.setDisable(true). This completely disables the comboBox, but I want it to still open – benjinne Jul 11 '17 at 18:27
  • @SedrickJefferson That question asks how to disable **some** items. I want all the items to be either disabled or enabled. Disabled meaning they can't be selected – benjinne Jul 11 '17 at 18:58
  • One of the answers addresses your issue. – SedJ601 Jul 11 '17 at 19:00
  • 1
    I am under the impression that if you find a solution on how to disable some items, that you can extend it to all items. – SedJ601 Jul 11 '17 at 19:08
  • Thanks. Using the setCellFactory in the else statement calling setDisable(true) correctly disables them, but now I need to figure out how to change their color so they look disabled – benjinne Jul 11 '17 at 19:18
  • I think that was a part of Jame_D's answer using CSS. – SedJ601 Jul 11 '17 at 19:48

0 Answers0