Board index » cppbuilder » Mouse Wheel in Combo Box

Mouse Wheel in Combo Box


2008-07-03 10:13:54 PM
cppbuilder93
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
 
 

Re:Mouse Wheel in Combo Box

Paolo Roberto Grassi wrote:
Quote
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.
Quote
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();
}