Hi !
My software’s users complain about that they cannot use mouse wheel on ComboBox widget.
They can do this in other softwares!
To retrieve some peace of mind, I’ve added this feature by modifying Juce code.
My contribution is a mix from ComboBox::keyPressed and ListBox::mouseWheelMove:
[code]void ComboBox::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) // D/LABS
{
bool eventWasUsed = false;
if (wheel.deltaX < 0 || wheel.deltaY > 0)
{
int index = getSelectedItemIndex() - 1;
while (index >= 0 && ! selectIfEnabled (index))
--index;
eventWasUsed = true;
}
else if (wheel.deltaX > 0 || wheel.deltaY < 0)
{
int index = getSelectedItemIndex() + 1;
while (index < getNumItems() && ! selectIfEnabled (index))
++index;
eventWasUsed = true;
}
if (! eventWasUsed)
Component::mouseWheelMove (e, wheel);
}[/code]
I think it could be great to integrate this in next Juce release.
…especially for my users
Thanks for your interest about this.