Reputation: 16620
I am using the VirtualTreeView together with the OnMeasureItem
event to display rows of variable size. The problem is that the event seems to be called only if a row is painted (following the virtual paradigm). But this leads to the scrollbar being displayed incorrectly. If I scroll to the bottom (by dragging the scrollbox with the mouse, not clicking the scroll buttons at the top or bottom), not the last row is displayed (which is what I would expect), but some row in the middle. After that, the scrollbar is updated and I can scroll further down. It seems as if the component uses the DefaultNodeHeight
for its scrolling calculations. But since my rows have variable height, I cannot specify a DefaultNodeHeight
that would lead to correct results. Option toVariableNodeHeight
is enabled.
Has anyone experienced this before and maybe found a workaround? Or am I doing it wrong?
Upvotes: 4
Views: 1841