Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NETVB.NET
Hey guys, I am just wondering does anyone know how to close a dropdown list using the mouseleave event? I have looked for examples everywhere but with no luck. Thanks for your help.
Posted 11-Nov-12 23:11pm
Mickt19852.1K
Comments
Member 9562996 at 12-Nov-12 6:00am
   
close means it should not be visible or just disable?
Mickt1985 at 12-Nov-12 6:22am
   
When you select the dropdown list it shows say 20 items, I want to close the list once the mouse leaves the list items. Cheers
Storxstar at 12-Nov-12 8:22am
   
I reckon your best bet would be to dynamically select something else on mouse leave of the dropdown. Thus setting the focus to something else. closing your dropdown.
Mickt1985 at 12-Nov-12 10:42am
   
Yeah that makes sense, but surely there is an event on the dropdown that you could call to close it. Maybe im just being silly here, anyway thanks for your help.
aodennison at 12-Nov-12 16:31pm
   
comboBox1.DroppedDown = false; does close the drop down list as you might expect. The problem is that combo1_MouseLeave (event) does not fire when the mouse leaves, if the drop down is dropped. I also investigated MouseMouse. It also does not fire while the drop down is dropped. I seem to remember having this problem in VB6. The drop down is managed by the system. This allows the drop down to drop outside the limits of the host window and on top of other applications, until it is closed, but means the application has little visibility into any events that happen while dropped down.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This solution might Help
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 576
1 OriginalGriff 183
2 Tadit Dash 150
3 Peter Leow 140
4 Sergey Alexandrovich Kryukov 121
0 Sergey Alexandrovich Kryukov 9,280
1 OriginalGriff 5,473
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid