combo box: Don't change first item

  • Hi,
    I have two comboboxes for two different flats on an airial pano.
    I made the first items as non-clickable titles for the box, "flat1" and "flat2". Below, there are the links to the different rooms.
    When I click on a room, the scene is changing and the actual scene-name is put into the first item of the box.

    What I want, is that my box-titles will always stay, independently of what scene is shown. Is there a way to do this?

    Another combobox question: how do I change the background color of the actual scene item? and do I realize a mouseover-background-color-change in the box. I think I have to put some code within the <item>-tag, but what is the code?

    Thanxalot
    M

  • Hi,

    yes - the in onclick of each <item> add a call like 'selectiditem(NAME-OF-THE-FIRST-ITEM)' to select the first item again after the onclick.

    Here an example - there always the 'SETTINGS' item will keep selected:

    Code
    <plugin name="skin_cb_settings"  keep="true" style="skin_combobox" align="leftbottom" x="10" y="10" width="150" rowcount="10">
      <item name="settings" caption="SETTINGS" />
      <item name="norm" 	caption="Normal Projection"    	onclick="skin_normal_projection();    	selectiditem(settings);" />
      <item name="archi"	caption="Architectural Projection" onclick="skin_architectural_projection(); selectiditem(settings);" />
      <item name="fisheye"  caption="Fisheye Projection"   	onclick="skin_fisheye_projection();   	selectiditem(settings);" devices="Flash" />
      <item name="stereo"   caption="Stereographic Projection" onclick="skin_stereographic_projection(); selectiditem(settings);" devices="Flash" />
      <item name="planet"   caption="Little Planet"        	onclick="skin_littleplanet_projection();  selectiditem(settings);" devices="Flash" />
      <item name="drag2d"   caption="Drag Control"   onclick="set(control.mousetype,drag2D); set(control.touchtype,drag2D); selectiditem(settings);" />
      <item name="moveto"   caption="MoveTo Control" onclick="set(control.mousetype,moveto); set(control.touchtype,moveto); selectiditem(settings);" />
    </plugin>

    See the example live here:
    https://krpano.com/plugins/combobox/#examples

    Best regards,
    Klaus

  • that works, thanks a lot!
    What about my other question about how to change background colors of combobox items?
    And: is it possible to put some css-style within the <item>-tag or generally in other tags?

    regards,
    m.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!