Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Hiding popup menu Collapse All
Subject Author Date
Eric LeVin Nov 26, 2009 - 8:16 AM

Hello,

How can I hide a popup menu?

When a button on the popup is clicked, the code takes a moment to run. During this time, the popup is frozen and on top of all active windows.

I’m trying to find out how to force the popup to hide (and if necessary redraw the form). I’ve tried calling popup.hide, doevents, etc., but the popup remains visible.

Thanks for your help!

Eric LeVin Dec 8, 2009 - 4:08 AM

Its working now...thanks.

Eric LeVin Nov 30, 2009 - 8:26 AM

Thanks for the reply.

I tried the suggestion, but it is not working. using ’ popup.hide(false) ’ causes the popup to fade somewhat, but it is still visible.

I also tried adding this code after popup.hide:

do
application.doevents
loop until popup.visible=false

.....but the popup says it is hidden while it is still visible.

I can’t run this particular code in a background thread because it needs to be on the UI thread.

Thanks for your help!

Technical Support Dec 1, 2009 - 7:55 AM

You can obtain the Form object(the main popup window) by calling Popup.GetForm() before you hide the popup. Using its properties you can know whether the main popup window is still visible or not. Please tell us about the results.

Technical Support Nov 26, 2009 - 11:06 AM

Try an overloaded Popup.Hide() method as follows:

Popup.Hide(false)
This forces the popup to hide without animation which is the only way to hide the popup if you execute your handling code in the same thread as popup’s. Alternatively you can run the handling code in a separate thread so you don’t need to invoke the Hide() method: the popup menu hides in the background while your code is executing in a parallel thread.