comboboxc++buildermousewheelc++builder-xe6

how to make DBLookupComboBox mouse wheel work


How to use the mouse wheel to move between listed items in the DBLookupComboBox? Like the way it does in ComboBox.

I am using c++builder xe6


Solution

  • I found it for every one suffered the answer is simple

    in FormMouseWheelDown event write this down

    if (DBLookupComboBox1->Focused() == true) DBLookupComboBox1->Perform(WM_KEYDOWN, VK_DOWN, 0);

    and in FormMouseWheelUp write

    if (DBLookupComboBox1->Focused() == true) DBLookupComboBox1->Perform(WM_KEYDOWN, VK_UP, 0);

    that is it .. enjoy