Hello, hello,
so I have a list box where lines get added at the bottom continuously. I normally call
InsertListItem(pFil, FIL_LISTBOX, -1, Line, 0);
GetNumListItems (pFil, FIL_LISTBOX, &Size);
SetCtrlAttribute(pFil, FIL_LISTBOX, ATTR_CTRL_INDEX, Size-1);
so that the last line is visible at the bottom.
But if I add a vertical scroll bar, and I would like to stop the scrolling (while still adding new lines) if the user moves the scroll bar anywhere but the bottom position.
Catching the EVENT_VSCROLL event seems to give me the top index in eventData2 but I don't see how to use that info. First I have to wait for the user to release the mouse (or keyboard ?) This newTopIndex seems different that what I can read with GetCtrlAttribute(...ATTR_CTRL_INDEX...) Why is that ?