當我按下* ok提醒框的按鈕我想要txtOther.textbox爲焦點。 這裏的txtbox是集中時,警告框顯示,並在我按下文本框的確定按鈕txtOther.textbox不重點。 請幫我....重點進/出問題Flex Bug
MXML SCRIPT:
<mx:Canvas id ="parentCanvas1" label="General" >
<mx:VBox id="parentBox1">
<mx:Canvas id="cvsGeneral">
<mx:TextInput id="txtOther" focusOut="txtOther_Validate();"/>
</mx:Canvas>
</mx:VBox>
</mx:Canvas>
<mx:Canvas id="parentCanvas2" >
<mx:HBox id="parentBox2" >
<mx:Button label="Save" id="btnSave" click="txtOther_Validate();" />
</mx:HBox>
</mx:Canvas>
////////////Action script////////////////////
public function txtOther_Validate(): void {
// here lets assume that the result variable is stored as "FAILURE"
if(result == "FAILURE"){
Alert.show("Please enter a valid Format Mask.");
txtOther.setFocus(); //
}
}
這裏即使在顯示警告框的txtother.textbox的焦點也設置..但按警報的TxtOther的焦點的確定按鈕後。文本框沒有設置..所以這裏我想觸發警報窗口的確定按鈕後,並沒有之前觸發fccus事件..如何做到這一點...
請幫助我。 在此先感謝..
您對哪個TextInput的focusOut執行驗證?你如何創建你的警報框?請顯示一些代碼。 – JeffryHouser
你爲什麼要刪除這個問題?這裏是說明:http://meta.stackexchange.com/questions/25088/how-can-i-delete-my-post-on-stack-overflow如果你想編輯自己的問題,。看看這裏:http://meta.stackexchange.com/questions/73754/how-do-i-edit-my-own-question – JeffryHouser
http://stackoverflow.com/questions/7006140/alert-is-triggered-multiple 7007549#7007549其實這是上述鏈接的副本,但在這裏我已經使我的要求,以簡單.. 所以,請不要忽略我的問題 –