You are not logged in.

simon64

Beginner

  • "simon64" started this thread

Posts: 34

Location: uk

Occupation: architectural illustrator

  • Send private message

1

Friday, October 12th 2018, 4:34pm

combobox

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 ?

2

Monday, October 15th 2018, 4:43pm

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/#selectitembyname

Here 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) );"
        />


Best regards,
Klaus

simon64

Beginner

  • "simon64" started this thread

Posts: 34

Location: uk

Occupation: architectural illustrator

  • Send private message

3

Wednesday, October 24th 2018, 10:51am

thankyou klaus

ramirox3

Intermediate

Posts: 197

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

4

Monday, May 27th 2019, 8:58pm

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/#selectitembyname

Here 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

This post has been edited 1 times, last edit by "ramirox3" (May 29th 2019, 3:49pm)


ramirox3

Intermediate

Posts: 197

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

5

Tuesday, June 11th 2019, 3:48pm

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.

light_line

Trainee

Posts: 69

Occupation: krpano freelancer || creating ideas & coding them || krpano developer

  • Send private message

6

Tuesday, June 11th 2019, 6:29pm

sorry,
my answer was wrong.
I removed it.

This post has been edited 1 times, last edit by "light_line" (Jun 11th 2019, 6:44pm)


ramirox3

Intermediate

Posts: 197

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

7

Tuesday, June 11th 2019, 10:30pm

thanks for your intention.
I will wait for Klaus answer

8

Saturday, June 15th 2019, 2:45pm

Hi,

my posted code was only an example, have you adopted it correctly to your own actual example?

Best regards,
Klaus

ramirox3

Intermediate

Posts: 197

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

9

Sunday, June 16th 2019, 1:02am

It means that the code should not be copied literally and paste it?
That's what I did. But it did not work

Similar threads