Friday, July 1, 2011

javafx listview sometimes doesn't catch clicks

I had this form:

    def viewerWrapper = Group {
                content: [
                    viewerScroll,
                    contents
                ]
            }
    def viewerContent = [
                viewerWrapper,
                ... //other components


contents is VBox holding ListView.

In this configuration contents sometimes didn't catch mouse clicks. You had to click twice.

The solution is to move contents up from the Group:


    def viewerWrapper = Group {
                content: [
                    viewerScroll,
                ]
            }
    def viewerContent = [
                viewerWrapper,
                contents
                ... //other components


this will work perfectly

No comments :

Post a Comment