header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
privincent
Points:120
Posts:0

8/24/2010 1:58:39 AM

Title: issue in combobox






<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()">
<mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.controls.List;
        import mx.collections.ArrayCollection;
        private var csss:CSSStyleDeclaration;   
        [Bindable]
        private var myDP:ArrayCollection = new ArrayCollection([{name:"Ted Patrick", blog:"http://www.onflex.org/"},
            {name:"Ryan Stewart", blog:"http://blogs.zdnet.com/Stewart"},{name:"Peter DeHann", blog:"http://blog.flexexamples.com/"},
            {name:"Raghu", blog:"http://raghuonflex.wordpress.com/"},{name:"Harish Sivaramakrishnan", blog:"http://flexgeek.wordpress.com/"}
            ]);       
        [Bindable]
        private var myDropdownFactory:ClassFactory;       
        private function initApp():void{
            var str:String="vincent"
            myDropdownFactory = new ClassFactory(List);
            myDropdownFactory.properties = {showDataTips:true,dataTipFunction:myDataTipFunction}
            myCB.dataProvider=myDP;
            myCB.styleName="combobox"
           
                    }       
        private function myDataTipFunction(value:Object):String{
            return (value.name+"'s blog is "+value.blog);
        }       
    ]]> 
</mx:Script>
<mx:Style source="../com/vv.css"/>
<mx:Style>
.combobox{
corner-radius:5;
color:#ff0000;
border-color:#b7babc;
highlight-alphas:0.3,0;
fill-alphas:0.6,0.4,0.75,0.65;
fill-colors:#ffff66,#ff33ff,#6600ff,#eeeeee;
background-alpha:0;
selection-color:#00ff00;
textSelected-color:#ff00ff;
use-roll-over:true;
roll-over-color:#ff0033;
text-roll-over-color:#330000;
theme-color:#33ff00;
alternating-item-colors:blue,#66ff00;
open-duration:242;
close-duration:241;
text-align:left;
font-family:verdana;
font-size:11;
text-decoration:none;
font-weight:normal;
letter-spacing:0;

}   
</mx:Style>
<mx:Button id="vincent" label="vincen"/>
<!--<mx:List id="myList" styleName="vvv" dataProvider="{myDP}" labelField="name" showDataTips="true" dataTipFunction="myDataTipFunction"/>-->
<mx:ComboBox id="myCB" labelField="name"  prompt="Choose a Blogger" dropdownFactory="{myDropdownFactory}"/>
</mx:Application>

vv.css


/* CSS file */
List {   backgroundAlpha: 1;   alternatingItemColors: #ffffff, #e8f2fe;   borderThickness: 1;   borderColor: #006699;   cornerRadius: 0;   color: #000000;}



Pl any one help me issue is while applying themes its applied to combo box list and while we put style name to combo box its applied but in list its not override alternatingItemColors



1
Inder
Points: 2980
Posts:0
8/24/2010 10:34:44 PM



in your list control you have specified styleName="vvv" but in stylesheet you have used global style for all List components. Remove the style property from List component and it works.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions