Hmm, that looks ok.  Maybe a timing issue with the rendering? Try setting the 
selectedIndex using callLater.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Yiðit 
Boyar
Sent: Tuesday, December 05, 2006 7:58 AM
To: [email protected]
Subject: [flexcoders] how to stop tab from changing

 

i have an accordion, in which when the user clicks sth inside the first tab; 
the second tab is loaded.
the problem is that; i have to prevent user from opening the second tab. i need 
to show an error and reselect the 1st tab.
to make this; i have added an event listener for the change event of the 
accordion but; i can give the error, but can not
reselect tab 0.
my code is below, can anyone help me please?
thanks..
---
private function tabChangeControl(e:Event):void{
                if(accordi.selectedIndex == 1 && bilgiler.enabled==false){
                    e.preventDefault();
                    Alert.show('Önce görev seçmelisiniz','Hata'); //error 
message
                    accordi.selectedIndex=0; //THIS DOES NOT WORK!!!
                }
            }

 

________________________________

Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers 
<http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx>
 .

 

Reply via email to