TMSFNCListBox1BeforeDrawItemText is not called if scrolling with pageup/pagedown keys or if clicking on scrollbar.
Simply place a TTMSFNCListBox on a form and connect the following events to form and listbox, then click with mouse on listbox and press pagedown key.
procedure TForm3.FormCreate(Sender: TObject);
begin
for var Li := 0 to 999 do
TMSFNCListBox1.AddItem('FormCreate ' + Li.ToString);
TMSFNCListBox1.SetFocus;
end;
procedure TForm3.TMSFNCListBox1BeforeDrawItemText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; AText: string; var AAllow: Boolean);
begin
AItem.Text := 'BeforeDrawItemText ' + AItem.Index.ToString;
end;