2

A simple question (but can't find any answer nonetheless :(). Java's Swing has an editable property for the ComboBox so user can type to find the value. I check Scala's ComboBox implementation, and there is an editable property.

So the question is, how can I set the ComboBox's editable to true (or false) in Scala's Swing?

Thanks before.

bertzzie
  • 3,558
  • 5
  • 30
  • 41

1 Answers1

2

There is makeEditable method, but I can't find any inverse method so you have to use underlying component (scala swing is just a thin wrapper over java swing) to set editability to false:

mycombo.peer.setEditable(false)
om-nom-nom
  • 62,329
  • 13
  • 183
  • 228