콤보 상자에서 선택한 항목을 프로그래밍 방식으로 설정하는 데 도움이 필요합니다.플렉스 : 프로그래밍 방식으로 선택한 항목을 콤보 상자에 넣기
나는이 같은 콤보를 가지고 :
<mx:ComboBox id="MyComboBox" change="puzzleHandler(event);" prompt="Make a Selection">
<mx:ArrayCollection id="myDP">
<mx:Object id="first" label="Label 1" series="2" pageTitle="Title 1"/>
<mx:Object id="second" label="Label 2" series="7" pageTitle="Title 2"/>
<mx:Object id="third" label="Label 3" series="9" pageTitle="Title 3"/>
</mx:ArrayCollection>
</mx:ComboBox>
내가 딥 링크에 관해서 기능을 가지고있다. 다른 사용자가 www.mysite.com/#view=2 URL을 입력하면 해당 사이트의 해당 부분으로 이동하게됩니다 (comboBox에서 Label 2를 선택하지 않은 경우). 콤보 상자를 프로그래밍 방식으로 설정하여 사용자가 보는 것과 일치하도록하려면 어떻게해야합니까?
내 함수의 switch 문에서 comboBox를 뷰에 해당하는 레이블로 설정하려고합니다. "view = 2"이면 comboBox에 "Label 2"가 선택되어 표시됩니다.
case "view=1":
MyComboBox.selectedItem.label="Label 1";
parseUrl();
case "view=2":
MyComboBox.selectedItem.label="Label 2";
parseUrl();
case "view=3":
MyComboBox.selectedItem.label="Label 3";
parseUrl();
시도해 보았습니다. MyComboBox.selectedItem.label = "Label 1"그러나 작동하지 않습니다. 어떤 제안?
감사합니다.
-Laxmidi
안녕하세요, Flextras.com, 도움이 필요합니다. 나는 옵션 2와 함께 갔다. 그리고 그것은 컸다. 감사! – Laxmidi
@Laxmidi 도움이 되니 기쁩니다. 이것을 정답으로 받아 들여야한다는 것을 잊지 마십시오. – JeffryHouser
+1 나는 대답을 받아 들일 수 없기 때문에 : – zawhtut