Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Strange Problem Making Popup Stay Visible
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Strange Problem Making Popup Stay Visible

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: Strange Problem Making Popup Stay Visible
    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.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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? 
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.