I have a problem with a custom listbox and scrolling on the fifth edition SDK.
I have everything working and scrolling works fine through the OfferKeyEventL.
However, when I drag or page down using the scrollbar thumb on the touch UI, I never get a Draw event, or any other event inside my custom listbox. But worse still, the listbox is redrawn incorrectly - the last item in the listbox is repeatedly drawn for each item in the listbox.
I examined overriding the MEikScrollBarObserver::HandleScrollEventL method. But the data here doesn't allow me to evaluate the scroll position fully.
The CEikScrollBar::ThumbPosition() method gives me an arbitary value. I can't compare it to any other value to determine where thumb is on the scrollbar. I looked at the TEikScrollBarModel and the values in there make no sense.
- The iScrollSpan is a large minus value
- The iThumbPosition is a different value to CEikScrollBar::ThumbPosition()
- The iThumbSpan is also a random value.
I can't even determine the direction of a drag event (whether the thumb is being dragged up or down).
Is there anyway I can capture a drag/page scroll event and also determine what the scroll direction and scroll position?
Is there someway of forcing the scrollbar not to redraw the listbox and allow my custom listbox drawer to do the drawing?