Like probably most people these days, I tend to scroll listboxes by using the mousewheel. That is, it’s rare to have the mouse pointer enter the scrollbar. Today I noticed something odd when mousing over the scrollbar under macOS Sonoma - there were some unexpected visual effects. Investigating this, I quickly pinned it down to the PaintCellText event.
Ordinarily, this event fires row by row and column by column - all columns for the first row from 0 to n, then the same for subsequent rows. However, when I moved the mouse over the scrollbar (no mousedown), the event didn’t fire for columns 0 and 1, but did for the following columns. It was easy enough to fix, but why should the PaintCellText event be firing anyway, if the mouse is over the scrollbar?
Under Linux and Win-10, the visual effects did not occur, meaning that either the event does not fire when the mouse is over the scrollbar, or it fires for all columns.
This was with 2023R4.
4 posts - 3 participants