Thanks for the great tips.  The changes worked great.  I wonder if there is additional overhead associated with declaring untyped special type variables (*) compared to typed variables?

I couldn't get the color picker focus border to dissapear completely.  Nothing that I tried with the FocusManager worked.  I'm probably just doing it wrong.  But, for now the sample is good enough to demonstrate the ComboBox ItemRenderer concepts.

Thanks again,
Tim Hoff

http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=447 

--- In [email protected], "Jeremy Lu" <[EMAIL PROTECTED]> wrote:
>
> hi Tim,
>
> try this (solves yellow can't be selected problem):
>
> private function addColor(event:Event):void {
> cp.visible = false;
> //
> var itm:* = cp.dataProvider[ cp.selectedIndex ];
> Util.traceValue(itm);
> //
> colorArray.push({label:itm.label, color:itm.color});
> messageText.setStyle('color',itm.color);
> messageText.text = itm.label + " has been added to the comboBox.";
> cbxColor.open();
> btnAddColor.setFocus();
> }
>
> things I changed:
>
> 1. listen to ColorPicker's "close" event, instead of "change" event
>
> 2. get the value from cp using "selectedIndex" instead of "selectedItem",
> this will ensure you get the right value out of the picker.
>
> regarding the focus around cp after it's set invisible, can't figure out it,
> but in the past when I ran into this, I usually set focus to a textfield off
> the stage or completely turn off the focus.
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to