Discussion:
Mouse Wheel in Combo Box
(too old to reply)
Paolo Roberto Grassi
2008-07-03 14:13:54 UTC
Permalink
Hi!
I have a problem with comboboxes like TComboBoxEx.
When the control is focused, the mouse wheel, when used, change the
element. I don't want to use that "feature" but no "onMouseWheel" event,
or similar, is present on thoose controls.
How can I toggle mouse wheel or pass the control to, for example, the
form?!?

Any Ideas?!?

Thanks for your attention
PRG
Tom420
2008-07-17 02:11:27 UTC
Permalink
Post by Paolo Roberto Grassi
I have a problem with comboboxes like TComboBoxEx.
When the control is focused, the mouse wheel, when used, change the
element. I don't want to use that "feature" but no "onMouseWheel" event,
or similar, is present on thoose controls.
It's an automatic Windows behavior, not something you have to code.
Post by Paolo Roberto Grassi
How can I toggle mouse wheel or pass the control to, for example, the
form?!?
Take the focus away from the component once the user is done dealing
with it. Here is an example of how I do it in my current project. The
user selects a paragraph style from a combo box. Once he has selected
the desired style, I apply the style to my text component (SetStyle())
than set the focus back to the text component (TextEngine) using it's
SetFocus() method. Below is the OnChange event of the combo box.



void __fastcall TfrmMain::cbStylesChange(TObject *Sender)
{
TextEngine->SetStyle(cbStyles->ItemIndex);
TextEngine->SetFocus();
}

Loading...