Hi,
I’m in the process of writing a custom listbox, but I have run into an issue of unpredictable behavior with the vertical scrollbar. Basically, when I click either the up or down arrows, the scroll bar behaves as though I clicked in the PgUp or PgDown areas. If I click in the PgUp/PgDown areas of the scrollbar, then the scroll goes one line up/down at a time. I’ve noticed the size parameter, but its description (“How much can we see?”) is somewhat vague. How should this parameter’s value be calculated?
A typical call that I make is
m_iTopIndex = (int)(GUI.VerticalScrollbar(
scrollbarPos,
m_iTopIndex,
2.0F, // have no idea how to calculate properly.
0.0f, // top value
(float)numItems)); // bottom value (numItems == roughly 6800)
Thanks,
Brian