Bind ListView to custom non-attached scroll bar
-
I am revisiting some code I worked on a while ago. I know I had to jump through some hoops to get things working how I needed them to, so things aren't necessarily done in the most standard way. One aspect of this is that I have a
ListView
and a non-attached custom verticalScrollBar
. Essentially, the scrollbar is in a separate rectangle, adjacent to theListView
.My question: is there a standard way to bind the visible position of the
ListView
to the scrollbar position?What I actually did was this (in the
ListView
):contentY: contentHeight * vbar.position
At this point, I have no recollection of how I arrived at this approach. I have not been able to find any documentation suggesting it. Although it seems to work well enough, I am noticing some occasional binding loop errors for
contentY
in the debug console. They do not appear to have any visible impact but I am still concerned so I wondered if there was another approach I could try. -
I am revisiting some code I worked on a while ago. I know I had to jump through some hoops to get things working how I needed them to, so things aren't necessarily done in the most standard way. One aspect of this is that I have a
ListView
and a non-attached custom verticalScrollBar
. Essentially, the scrollbar is in a separate rectangle, adjacent to theListView
.My question: is there a standard way to bind the visible position of the
ListView
to the scrollbar position?What I actually did was this (in the
ListView
):contentY: contentHeight * vbar.position
At this point, I have no recollection of how I arrived at this approach. I have not been able to find any documentation suggesting it. Although it seems to work well enough, I am noticing some occasional binding loop errors for
contentY
in the debug console. They do not appear to have any visible impact but I am still concerned so I wondered if there was another approach I could try.