You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, June 9th 2014, 2:19pm

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

2

Thursday, June 12th 2014, 6:10pm

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:

Source code

1
2
3
4
5
6
7
8
9
10
<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:
http://krpano.com/plugins/combobox/#examples

Best regards,
Klaus

3

Friday, June 13th 2014, 10:37am

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.

4

Saturday, June 14th 2014, 5:34pm

Hi,

for customizing the html5 combobox plugin look here:
http://krpano.com/plugins/combobox/#attributeshtml5

especially at the 'customstyle' setting and the combobox.png image there:
http://krpano.com/plugins/combobox/#customstyle

Best regards,
Klaus

5

Saturday, June 14th 2014, 8:55pm

yes, I already tried to understand that stuff. But I didn't manage to change the background of only some or a single item.

6

Saturday, June 14th 2014, 9:29pm

To change the background color you need to edit the image.