Strange Problem Making Popup Stay Visible |
Post Reply |
Author | |
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
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. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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?
|
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |