PC Review


Reply
Thread Tools Rate Thread

Disable scrollwheel in ComboBox?

 
 
Chris DiPierro
Guest
Posts: n/a
 
      4th Mar 2005
Is there a way to disable scroll wheel support in a combobox?

Basically, I have a situation where a user chooses an option in a
combobox. I'm handling the selected index change event, and due to the
option they chose, the combobox itself is being destroyed (dynamic UI).

However, if they've managed to choose an option and then roll the scroll
wheel, I'll get an unhandled exception when Windows tries to fire the
events associated with the scrollwheel choices.

Even if I can't disable the scrollwheel, is it possible to clear the
event queue of any events related to the control?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmFnaGF2ZW5kcmFuIE11cmFsZWV0aGFyYW4=?=
Guest
Posts: n/a
 
      4th Mar 2005
Instead of finding a way to trap a scroll wheel, you can use a flag and then
turn it to true whenever the control itself is destroyed. And put all the
code in the selectedIndex event handler inside the false of the flag.

Not a graceful solution I agree. But still a patch like this would work till
you get a elegant solution.

"Chris DiPierro" wrote:

> Is there a way to disable scroll wheel support in a combobox?
>
> Basically, I have a situation where a user chooses an option in a
> combobox. I'm handling the selected index change event, and due to the
> option they chose, the combobox itself is being destroyed (dynamic UI).
>
> However, if they've managed to choose an option and then roll the scroll
> wheel, I'll get an unhandled exception when Windows tries to fire the
> events associated with the scrollwheel choices.
>
> Even if I can't disable the scrollwheel, is it possible to clear the
> event queue of any events related to the control?
>

 
Reply With Quote
 
Chris DiPierro
Guest
Posts: n/a
 
      7th Mar 2005
Ideally true, but it's not my handling of the event that's a problem.
Instead I get an exception when Windows tries to dole out the event to
my now disposed control.


Raghavendran Muraleetharan wrote:
> Instead of finding a way to trap a scroll wheel, you can use a flag and then
> turn it to true whenever the control itself is destroyed. And put all the
> code in the selectedIndex event handler inside the false of the flag.
>
> Not a graceful solution I agree. But still a patch like this would work till
> you get a elegant solution.
>
> "Chris DiPierro" wrote:
>
>
>>Is there a way to disable scroll wheel support in a combobox?
>>
>>Basically, I have a situation where a user chooses an option in a
>>combobox. I'm handling the selected index change event, and due to the
>>option they chose, the combobox itself is being destroyed (dynamic UI).
>>
>>However, if they've managed to choose an option and then roll the scroll
>>wheel, I'll get an unhandled exception when Windows tries to fire the
>>events associated with the scrollwheel choices.
>>
>>Even if I can't disable the scrollwheel, is it possible to clear the
>>event queue of any events related to the control?
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't use my scrollwheel =?Utf-8?B?cGF0cmljaw==?= Microsoft Word Document Management 4 31st Mar 2007 07:54 PM
Scrollwheel doesn't work =?Utf-8?B?aGVua3dpbQ==?= Microsoft Access Forms 0 20th Dec 2004 11:55 AM
Scrollwheel in VBA Editor Chris_Fifield Microsoft Excel Misc 3 27th Jul 2004 06:40 PM
Disable scrollwheel? Harmannus Microsoft Access Forms 3 17th Feb 2004 12:44 PM
No Mouse ScrollWheel for OL Notes Ron H. Microsoft Outlook 0 17th Jul 2003 12:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.