Reputation: 245
I open a window with a ListView from a menu. When I select the one and only row, a new window is opened.
The problem is, when I close this window (and getting back to the previous with the ListView) and click on the ListView row again (which is still blue and hence selected), the window is not opened. It's like the event handler is not focused in that window. I've put a sout in the event handler and it is indeed only invoked/triggered the first time.
The only way to open the second window again is to close the first window too and open it from the menu again. Then click on the row and the second window is opened (but this works only the first time...).
What could be the problem?
Kind regards, Ramon
Upvotes: 0
Views: 347
Reputation: 49205
If you have attached event handler (which opens new window) on the listview's selected item or index property, then it is by design and expected to behave like that. To be able to trigger an event on selected item, you can implement custom listcell which handles mouse click events.
Upvotes: 1