0

我可以使用 MouseEvent 和 GetChildAt 方法更改当前选定元素的样式。我需要在不使用 Mouse Evets 的情况下从 actionscript 更改 mx:text 控件的颜色,例如列表中的第二个项目应该更改颜色。

我该怎么做?

感谢帮助

            <mx:List id="carTypesList" name="carTypesList" dataProvider="{carTypesResult}"
            height="93%" width="470"
            change="{this.parentApplication.setSelectedTextStyleSelected(event)}"
            >
            <mx:itemRenderer >
                <mx:Component>
                    <mx:HBox horizontalGap="0" width="470" verticalScrollPolicy="off" horizontalScrollPolicy="off"
                             mouseOver="{this.parentApplication.setSelectedTextStyleOver(event)}"
                             mouseOut="{this.parentApplication.setSelectedTextStyleOut(event)}">
                        <mx:Image id="modelDisabled" name="{data.@id}"
                                  width="12" height="12"
                                  visible="{data.@disabled == 'X'?true:false}"
                                  includeInLayout="{data.@disabled == 'X'?true:false}"
                                  source="img/resfleet/blocked_ico.png" />
                        <mx:Text text="{data}"
                                 click="{this.parentApplication.setSelectedTextStyleSelected(event); this.parentApplication.isReadOnly('ZNM00030') == false?this.parentApplication.modelSelector.setTypeExt():''}"
                            width="{data.@disabled == 'X'?418:430}"
                            maxHeight="100" />
                        <mx:Image id="modelInfoIconWhite" name="{data.@id}" source="img/resfleet/info_ico_sq_wh.png"
                                  width="12" height="12"
                                  buttonMode="true"
                                  useHandCursor="true"
                                  click="{this.parentApplication.isReadOnly('ZNM00030') == false?this.parentApplication.modelSelector.showModelInfo(event):''}"/>
                        <mx:Image id="modelInfoIconBlue" name="{data.@modnm}" source="img/resfleet/info_ico_sq_bl.png"
                                  width="12" height="12"
                                  buttonMode="true"
                                  useHandCursor="true"
                                  visible="{data.@action == 'X'?true:false}"
                                  includeInLayout="{data.@action == 'X'?true:false}"
                                  click="{this.parentApplication.readOnlyMode == false?this.parentApplication.modelSelector.showActionInfo(event):''}"/>
                    </mx:HBox>
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>
4

0 回答 0