Open harlock76 opened 9 years ago
I cant update the code to display correctly I'll try on jmonkey forum jesus fucking christ
I don't think you can directly add onClick to ListBox items this way. Internally the ListBox will use the controlDefinition for the item only as a template for the actual items it displays. The reason for that is, that the ListBox only allocates (internal) elements for the number of visible items in the ListBox - and not the actual entries.
Why do you need an onClick? The ListBox "should" handle that internally and report the change of the selection back to you without you having to worry about the actual onClick event.
I suppose this is not working in your example, right? Can you confirm that?
PS: I've fixed your original post to display the code correctly ...
Hello,
I spent hours trying to have this f... listbox do a simple item click
can someone look a this code ?