You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "FlashinnaPano" started this thread

Posts: 29

Location: Orygun, USA

  • Send private message

1

Wednesday, February 3rd 2010, 3:18am

Hiding combobox menu

Hello,

I have a combobox attached to a Google Map that can be hidden with a button. When I leave the combobox menu open and click the close button, the map and combobox are hidden but the combobox menu remains in place.

Is there any way to avoid an orphaned combobox menu like this?

Other than, "Don't do that!"

Thanks,
Joe

2

Wednesday, February 3rd 2010, 10:46am

Hi,

Try to put the plugin combobox visible false

Source code

1
set(plugin[combobox].visible, false);

  • "FlashinnaPano" started this thread

Posts: 29

Location: Orygun, USA

  • Send private message

3

Wednesday, February 3rd 2010, 4:10pm

Hello,

I have done that in my hide action:

Source code

1
2
tween(plugin[combobox].y, -100,  0.5, default);
set(plugin[combobox].visible,false);

The problem is that if I leave the menu part of the combobox open when hiding, the top part of the combobox moves offscreen and the drop-down menu part is left behind.

I haven't found any way to cleanup the orphaned menu part of the combobox....

Maybe I should also change the alpha?

Joe

4

Wednesday, February 3rd 2010, 4:56pm

or change the x or y to put outside the combobox *rolleyes*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

5

Wednesday, February 3rd 2010, 5:51pm

Hi FlashinnaPano,

I have played around your issue... and as you say, it seems that, setting the combobox visibility to false while the drop-down menu is displayed, makes the button part of the combobox to be hidden but not the drop-down menu...
Perhaps Klaus can improve the combobox plugin to avoid this *rolleyes* ....

A way to avoid this is to set to false the capture attribute of your close button that call your hide action... this way, the click action on your close button pass also to the pano and closes the combobox drop-down menu ...

I have tried this way and it worked...

Hope this can help.

SAlut.

  • "FlashinnaPano" started this thread

Posts: 29

Location: Orygun, USA

  • Send private message

6

Thursday, February 4th 2010, 4:52am

Hello Michel,
Perhaps Klaus can improve the combobox plugin to avoid this *rolleyes* ....

A way to avoid this is to set to false the capture attribute of your close button

An easy solution that works! I cannot ask for better....

Unfortunately, it's the sort of subtlety that is easy to miss for a newbie.

Thank you!
Joe

  • "FlashinnaPano" started this thread

Posts: 29

Location: Orygun, USA

  • Send private message

7

Tuesday, February 9th 2010, 4:14am

After some further use I have found that capture="false" will not work with the googlemaps plugin when I leave the combobox menu open.

I set capture="false" for the googlemap plugin itself and the googlemap radar and zoomcontrol subnodes. Leaving a combobox menu open and clicking within the googlemap or on the zoom control or radar does not dismiss the open menu. If I click in the panorama area the open menu closes.

So, capture="false" works, but not consistently... *sad*

Joe

8

Tuesday, February 9th 2010, 10:43am

Hi,

when you use the 1.0.8 beta 9 combobox plugin (included here for example),
there are a new "openlist" and "closelist" actions for the plugin,

with them the dropdown list can be opened or closed manually,

e.g.

Source code

1
plugin[combobox].closelist();


best regards,
Klaus

  • "FlashinnaPano" started this thread

Posts: 29

Location: Orygun, USA

  • Send private message

9

Tuesday, February 9th 2010, 8:34pm

Hello,

Thank you for pointing out this new option. I will give it a try....

I take it that this should be more reliable than capture = "false" to clean-up orphaned menu lists.

Joe

Similar threads