Hello,
How to create a drop-down list with icons and text or icons only?
I tried this way:
val icon1 = ..... // some BufferedImage
val icon2 = ..... // some BufferedImage
val triggerSlopeListButton =
namespace.get("triggerSlope").asInstanceOf[ListButton]
val triggerData = new org.apache.pivot.collections.ArrayList[ButtonData]
triggerData.add(new ButtonData(new Picture(icon1)))
triggerData.add(new ButtonData(new Picture(icon2)))
triggerSlopeListButton.setListData(triggerData)
triggerSlopeListButton.setSelectedIndex(0)
It displays the icon correctly on the button when it is *not pressed*,
but when I press it, the expanded list contains
text like this:
org.apache.pivot.wtk.content.ButtonData@433598ca
org.apache.pivot.wtk.content.ButtonData@4545ab34
Why?
I want my icons there instead of text.
Regards,
Piotr