Bugzilla – Bug 446805
ComboBox doesn't generate DropDownClosed when setting DroppedDown = false
Last modified: 2008-11-21 21:22:44 UTC
Created attachment 253638 [details] Combobox example Build: gmcs -r:System.Windows.Forms,System.Drawing,System combobox.cs and run If you click the ComboBox's button you will see the messages: "dropped" when the list appears and "closed" when the list disappears. Now, click the "Expand/Collapse", you will only see "dropped" when the list appears but you won't seen "closed" when the list disappears. Works in .NET.
BTW, I'm using the mono-2-2 branch.
This is blocking ComboBox support in UIA :(
Created attachment 253692 [details] Proposed patch Please review. Thanks :)
All tests pass after applying the patch. Jonathan, could you review? Thanks!
Created attachment 253962 [details] Proposed Patch How about this instead? If you click the button repeatedly in your test case, the dropdown only drops down once, because dropped_down is never getting set back to false. This patch should fix your issue and that one as well.
Yes, that patch works also for me. Can you commit? Thanks!
Fixed in r119450. Thanks for the report and patch testing! 2008-11-20 Jonathan Pobst <monkey@jpobst.com> * ComboBox.cs: Call HideWindow instead of Hide when closing the dropdown through DroppedDown so the proper events get called and state gets reset. [Fixes bug #446805]
Backported to 2.2 in r119561.
Thanks very much.