[flexcoders] Changing focus on the 'change' event in an Accordion

2005-04-06 Thread Andrea Veggiani

Hi all,

i'm not able to change correctly the child container of an Accordion using 
the
event 'change'.

my accordion:

mx:Accordion styleName=testo id=idMainAccordion width=100% 
height=100% change=verificaAccordion()
  destinazione  id=idDestinazione root={this} 
listaDestinazioni={listaDestinazioni} /
  listaservizi  id=idListaservizi root={this} Mesi={Mesi} 
Giorni={Giorni} /
  nomipax   id=idNomipax  root={this} Mesi={Mesi} 
Giorni={Giorni} /
  intestazione  id=idIntestazione root={this} /
/mx:Accordion

my function:

  function verificaAccordion()
   {

if  (!idDestinazione.step())
 {
  idMainAccordion.selectedIndex=0;
 }

   }

Well, the view change and i'm able to view the correct child, however this 
child seems not to be correctly focused
so i see the correct child container but the older one appears as selected 
(the header).

It's possible to change childs container in the accordion as i try to do?

Thanks
Andrea Veggiani



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 05/04/2005



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Changing focus on the 'change' event in an Accordion

2005-04-06 Thread Manish Jethani

On Apr 6, 2005 10:28 PM, Andrea Veggiani [EMAIL PROTECTED] wrote:


 mx:Accordion styleName=testo id=idMainAccordion width=100%
 height=100% change=verificaAccordion()
   destinazione  id=idDestinazione root={this}
 listaDestinazioni={listaDestinazioni} /
   listaservizi  id=idListaservizi root={this} Mesi={Mesi}
 Giorni={Giorni} /
   nomipax   id=idNomipax  root={this} Mesi={Mesi}
 Giorni={Giorni} /
   intestazione  id=idIntestazione root={this} /
 /mx:Accordion
 
 my function:
 
   function verificaAccordion()
{
 
 if  (!idDestinazione.step())
  {
   idMainAccordion.selectedIndex=0;
  }
 
}

So in the change event handler you're resetting the selectedIndex to
0.  That might cause problems for the tweening (the transition).  You
could instead wait for the tween to complete and then reset it.  The
amount of time it should take for the tween is
accordion.getStyle(openDuration) or thereabouts.

Manish


 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/