473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Disable scrollwheel in ComboBox?

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?
Jul 21 '05 #1
2 2597
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?

Jul 21 '05 #2
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?

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris DiPierro | last post by:
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...
2
by: GrandpaB | last post by:
Hi, How can I prevent the mousewheel from scrolling through the combobox items when it has the focus? Thanks, -- GrandpaB
2
by: RichG | last post by:
With the help of Cor Ligthert in a pryor post I was able to make this sub: Public Sub disableControls(ByVal frm As Form) 'this is to create a read only form that has active buttons Dim x As...
4
by: mkaszub | last post by:
Hi, I have a problem with combobox. On my form is many comboboxes and when I select same option and use my mouse roll, combobox change to next value. How to disable mouse roller? I tried to...
2
by: Ale | last post by:
how to disable a value or an option in the combobox after selecting it once.....say for ex....in students marks list...i want to enter marks of 5 subjects...whr i'll select the subject from a...
2
by: CenturionX | last post by:
Hello, Somebody knows how to disable the combobox button in Access 2002. I want to prevent the list be displayed. Thanks.
5
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either....
2
by: Claudia Fong | last post by:
Hi, I added a tabcontrol in a panel in my form. My tabcontrol have more than 3 pages.. each page contains textboxes, combobox, checkbox. I want to disable the items of each of the page of...
1
by: sirdevo | last post by:
There is one combobox on a subform named Report Soil Series Subform1. The combobox is named cboSoilSeries. I need to disable this so the user can't enter values. I could also disable the whole...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.