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:

    Code
    <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.

  • Hi again!

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

    1) you defined the first style devices as

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

    That's wrong.

    It should be:

    Code
    <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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!