You are not logged in.

1

Monday, September 9th 2013, 4:56pm

HTML5 combobox customstyle not working

Hello everyone.
I'm trying to give my combobox a more "flat" look, and so far I've succeeded in the flash version, which I thought would be the toughest one.
Regarding the HTML5, by reading the documentation, I assumed it would be just a matter of adding the "customstyle" attribute and directing it to a new PNG image created with the provided default combobox base-image as a template. So I created my flat-looking png, dropped it into the skin folder, and added the following code:

Source code

1
2
3
4
5
6
7
8
9
10
	<style name="combobox" devices="desktop|flash" url="%SWFPATH%/plugins/combobox.swf" alturl="%SWFPATH%/plugins/combobox.js" native="false" rowcount="20" />
	<style name="combobox" devices="iphone" url="%SWFPATH%/plugins/combobox.js" cbdesignscale="auto" customstyle="%SWFPATH%/skin/combobox_flat.png|0x797979|0x797979|0x797979|0x797979|0xf0f0ee|0xf0f0ee|0xf0f0ee" />
        <style name="combobox" devices="ipad" url="%SWFPATH%/plugins/combobox.js" customstyle="%SWFPATH%/skin/combobox_flat.png|0x797979|0x797979|0x797979|0x797979|0xf0f0ee|0xf0f0ee|0xf0f0ee" />
	<plugin name="cb_ENG" style="combobox" align="righttop" x="20" y="10" keep="true" >
		<item name="title" 		caption="VIEWS"  />
		<item name="1" 	        caption="1"             onclick="loadscene(scene_A01, null, MERGE, BLEND(1));"/>
		<item name="2" 		caption="2"		onclick="loadscene(scene_A02, null, MERGE, BLEND(1));"/>
	         .....
                <item name="9" 		caption="9"		onclick="loadscene(scene_A09, null, MERGE, BLEND(1));"/>
	</plugin>


As a result, the html5 version keeps showing the default look for the combobox.
I have the feeling I'm missing something obvious here... So I apologize if this is the case. Anyway, any hint will be much appreciated.

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Monday, September 9th 2013, 5:58pm

Hi!

Could it be that the url in the customstyle must be written with the single quotes? like this:

Source code

1
customstyle="'%SWFPATH%/skin/combobox_flat.png'|0x797979|0x797979|0x797979|0x797979|0xf0f0ee|0xf0f0ee|0xf0f0ee" />
Regards,

Alexey

3

Monday, September 9th 2013, 8:20pm

I've tried that since you suggested it, but still no luck. Thanks for the input, though.

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Monday, September 9th 2013, 10:18pm

Hi again!

Just tested your code in my small test VT and here two clinchers:

1) you defined the first style devices as

Source code

1
<style name="combobox" devices="desktop|flash"


That's wrong.

It should be:

Source code

1
<style name="combobox" devices="desktop+flash"


In your code first siyle overrides the two others.

2) I'm not sure about naming items with numbers, I've got a mistake log just outright... I'd rename them...

Hope this helps! *smile*
Regards,

Alexey

Similar threads