Closed Aufricer closed 5 years ago
As written, this appears not to be an issue... or the underlying issue should be fixed in a different way.
Applications may have left the background off of their list items on purpose and we cannot/shouldn't arbitrarily be adding them back.
Now, if the list itself has a background then the argument could be made that it should be intercepting the click and forwarding it to the items and that may be as easy as adding the click listener to ListBox directly just like is already done for the background listener: CursorEventControl.addListenersToSpatial(this, backgroundListener);
And if that doesn't work then backgroundListener is already receiving those events.
I don't have a test case to try that since all of my own lists have cell backgrounds. If someone tests that and find that it works then a separate pull request can be submitted. In the mean time, I'm going to close this one.
Thanks for trying to fix it, though.
As discussed in https://hub.jmonkeyengine.org/t/lemur-listbox-area-of-clickbehaviour-and-layout-question/40916/6 this bug fix will add an invisible background to the Button in listboxes. That will allow the user to click the whole line in a listbox to achieve a selection. Otherwise he will be only able to select a line if he clicks the text area in listboxes.