You are not logged in.

1

Wednesday, December 15th 2021, 7:58pm

Hide/Show combobox

Hello,
how can I hide/show a combobox clicking to an hotspot?
Thank you for help.


<hotspot name="example" url="images/example.jpg"
ath="100" atv="2"
distorted="true"
zorder="2"
scale="1"
visible="false"
alpha="1.0"
onclick=""
/>


<combobox name="test" design="vtour" align="righttop" x="10" y="10" alpha="1" onchange="selectItemByName(0);">
<item name="item0" caption="Test_combo" />
<item name="item1" caption="Combo 1" />
<item name="item2" caption="Combo 2" />

</combobox>

San7

Professional

Posts: 626

Occupation: coding in krpano

  • Send private message

2

Thursday, December 16th 2021, 6:24am

Hello,
Try like this


<action name="..." autorun="onstart">
...
set(comb_x, 10);
</action>

in hotspot:

onclick="switch(comb_x, 10, -150); tween(layer[test].x, get(comb_x));"


-150 - how much to move the combobox / to hide it

3

Thursday, December 16th 2021, 11:02am

Hello,
thank you for your reply, it's working :) how can I close it clicking again to the hotspot? Thank you.

This post has been edited 2 times, last edit by "gaptat" (Dec 16th 2021, 11:40am)