Print Page | Close Window

Strange Problem Making Popup Stay Visible

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=844
Printed Date: 07 June 2024 at 7:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Strange Problem Making Popup Stay Visible
Posted By: Boyd
Subject: Strange Problem Making Popup Stay Visible
Date Posted: 15 June 2004 at 2:26pm

I have a control which behaves similar to the drop-down button on a ComboBox.  When you click the button, I want a CommandBar Popup menu to appear below the control.  Making the popup appear is pretty simple, but I'm having trouble getting it to behave the way I want.

With the button on a ComboBox, the drop-down list appears on the MouseDown event.  If I use the MouseDown event to display a popup below the control, the popup will disappear when the user raises the mouse button (as if the user had clicked an area outside the popup).  As best I can tell, the only way to avoid this is to use the MouseUp event.  The problem with using MouseUp is that the user must fully click on the drop-down button (not just mouse down) in order for the popup menu to appear, and this is not consistent with other windows controls like the ComboBox.

Any ideas how I can display a CommandBar Popup menu from a MouseDown event and not have the popup close when the user releases the mouse button?  It's almost as if I need to direct the CommandBar popup NOT to respond to any mouse up/down information when the mouse is positioned over the drop-down button, but I don't have any idea how to handle this.




Replies:
Posted By: SuperMario
Date Posted: 19 October 2004 at 11:42am
It sounds like the CloseSubMenuOnClick property is what you are looking for.  Then you could use the ClosePopups method to close the menu.  Is this what you are looking for? 


Posted By: Boyd
Date Posted: 19 October 2004 at 11:52am

Nope... that wasn't it.  'CloseSubMenuOnClick' only prevents the menu from closing when you click on a menu item.  In this case, I'm trying to prevent the popup from closing when the user clicks a designated area outside of the popup (in this case, the drop-down portion of a combobox).

In the last release (9.50), a fix was implemented so that the popup menu ignores the first MouseUp command (which was causing most of my problems).  That was a sufficient work-around for now.  I still can't mimic a drop-down the way I would like, but it's close enough.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net