Sie sind nicht angemeldet.

1

Mittwoch, 15. Dezember 2021, 19:58

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>

2

Donnerstag, 16. Dezember 2021, 06:24

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

Donnerstag, 16. Dezember 2021, 11:02

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

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »gaptat« (16. Dezember 2021, 11:40)