wondered if anyone might know why when i use a combination of the combo box plugin and also 'next-prev' navigation arrows that the titles for the scenes in the combo box don't subsequently change to correspond with the scene when i choose to navigate using the 'next-prev' navigation arrows rather than a combobox selection ?
combobox
-
-
Hi,
a combobox is by itself only a combobox, when you using to show a scene selection, it doesn't know by its own that when a scene gets changed, that it should update itself.
But doing that is possible of course, e.g. use the 'onxmlcomplete' or 'onnewpano' events and there update the combobox by e.g. calling the 'selectitembyname' action:
https://krpano.com/plugins/combobox/#selectitembynameHere an example code:
Code<events name="cbbox_scene_update" keep="true" onxmlcomplete="layer[cbbox_scenes].selectitem( get(scene[get(xml.scene)].name) );" />
Best regards,
Klaus -
thankyou klaus
-
a combobox is by itself only a combobox, when you using to show a scene selection, it doesn't know by its own that when a scene gets changed, that it should update itself.
But doing that is possible of course, e.g. use the 'onxmlcomplete' or 'onnewpano' events and there update the combobox by e.g. calling the 'selectitembyname' action:
https://krpano.com/plugins/combobox/#selectitembynameHere an example code:
Source code
1
2
3
<events name="cbbox_scene_update" keep="true"
onxmlcomplete="layer[cbbox_scenes].selectitem( get(scene[get(xml.scene)].name) );"
/>Hi Klaus.
Where I must append this code, I've tried it in the .xml before the scenes, and also within the scenes, and the selected thumbnail in the combobox is still the initial -
The solution proposed by Klaus:
<events name = "cbbox_scene_update" keep = "true"
onxmlcomplete = "layer [cbbox_scenes] .selectitem (get (scene [get (xml.scene)]. name));"
/>It has not worked for me, days ago I asked about this, but I have not had an answer, someone can help me.
I have added the code suggested by Klaus in various parts and in the different xml files. But I have not been successful. -
sorry,
my answer was wrong.
I removed it. -
thanks for your intention.
I will wait for Klaus answer -
Hi,
my posted code was only an example, have you adopted it correctly to your own actual example?
Best regards,
Klaus -
It means that the code should not be copied literally and paste it?
That's what I did. But it did not work
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!