TAdvListBox MouseWheel-Support

How is it possible to navigate through items with mousewheel?

KeyUp / KeyDown works, but this not:

procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
begin
if advlistbox1.Focused then advlistbox1.Perform(wm_keydown, vk_down, 0);
end;

Thanks

Did you try something like;

procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
begin
if advlistbox1.Focused then advlistbox1.ItemIndex := advlistbox1.ItemIndex +1;
end;

Yes, i tried it, but it does not work. I´m usiing Delphi XE2 and latest release TMS VCL UI Pack.

If you have a problem, then please provide a sample source app to allow us to reproduce
I did the effort to create a test app.
Project1.zip (4.8 KB)
Testing this here, no problem can be seen.

Your Code works but if you add if advlistbox1.Focused then it does not work anymore.
Project1.zip (4.9 KB)

Your listbox needs to have focus of course if you add this condition.

If i click in it, it is focused but it does not work. Even if i set focus, event is not fired.

If you need to check the list focus, the code should be:

procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
begin
  if advlistbox1.ListBox.Focused then
  advlistbox1.ItemIndex := advlistbox1.ItemIndex + 1;
end;

procedure TForm1.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
begin
  if advlistbox1.ListBox.Focused then
  advlistbox1.ItemIndex := advlistbox1.ItemIndex - 1;
end;

Thank you. This works.