Sim sim... é veridico... eu que me passei quando sugeri o codigo. Postei no ISSUES como eles solicitaram, já com essa modificação.
Vicente Maciel Junior RiaBrazil - Senior Rich App Developer Independent Web Developer & Consultant Adobe Advanced Certified Developer Adobe Certified Instructor (ColdFusion & Flash Platform) +55 71 8120-0035 MSN: macie...@gmail.com / Twitter: macieljr http://www.riabrazil.com.br http://teclandoalto.blogspot.com Grupo de usuarios Oficial Adobe RIA-BA: http://bit.ly/ria-ba 2009/4/16 Stefan Horochovec <stefan.horocho...@gmail.com> > Apenas como "dica", essa discussão já ocorreu na FlexLib e segundo o > pessoal lá, melhor multiplicar por 0.5 do que dividir por 2, uma vez que > isso teria uma melhor performance... > > Não sei se é veridico, mas estou repassando o que li. > > Abraços > > Stefan Horochovec > Analista de Sistemas > Blog: http://www.horochovec.com.br/ > Use Java, Flex e Linux > > > > 2009/4/16 Vagner Mendonça <vagner...@gmail.com> > >> Com mesmo fonte que vc me mando nao centraliza perfeitammente como neste >> link pode ser a versao do meu swc, qual seria a lib mais atual do mdi >> disponivel? >> >> obrigado pelas respostas >> >> 2009/4/16 Vicente Maciel Junior <macie...@gmail.com> >> >>> Vagner, >>> Desculpe, mas vc deve estar cometendo algum erro... >>> >>> Simplesmente fazendo aquela modificação e executando o teste abaixo, >>> funciona perfeitamente! >>> >>> Teste: http://vpmjr.com.br/downloads/labs/flex/MDIWindowCenterTest.html >>> (com o source do teste... bem simples) >>> >>> Vicente Maciel Junior >>> RiaBrazil - Senior Rich App Developer >>> Independent Web Developer & Consultant >>> Adobe Advanced Certified Developer >>> Adobe Certified Instructor (ColdFusion & Flash Platform) >>> +55 71 8120-0035 >>> MSN: macie...@gmail.com / Twitter: macieljr >>> http://www.riabrazil.com.br >>> http://teclandoalto.blogspot.com >>> Grupo de usuarios Oficial Adobe RIA-BA: http://bit.ly/ria-ba >>> >>> >>> 2009/4/16 Vagner Mendonça <vagner...@gmail.com> >>> >>>> O codigo que abre a janela esta igual...a função que centraliza se eu >>>> colocar como vc me passo da erro.. >>>> >>>> public function center(window:MDIWindow):void >>>> { >>>> window.x = this.container.width / 2 - window.width /2; >>>> window.y = this.container.height / 2 - window.height /2; >>>> } >>>> >>>> agora se eu colocar no lugar do conteiner mdiCanvas que e o meu >>>> conteiner nao da erro >>>> o resto do codigo e a mesma coisa nao estou mudando nada nao da erro e >>>> so move a janela um poco para o centro maiss nao centraliza... >>>> >>>> >>>> * >>>> >>>> public >>>> **function* center(window:MDIWindow):*void* >>>> >>>> { >>>> >>>> window.x = >>>> *this*.mdiCanvas.width / 2 - window.width /2; >>>> >>>> window.y = >>>> *this*.mdiCanvas.height / 2 - window.height /2; >>>> >>>> } >>>> >>>> >>>> 2009/4/16 Vicente Maciel Junior <macie...@gmail.com> >>>> >>>>> Vagner, >>>>> Primeiro mude aquele código que citei na classe MDIManager. Depois >>>>> disso, basta vc usar o código que vc estava utilizando antes... >>>>> >>>>> mdiCanvas.windowManager.addCenter(win_0004); >>>>> >>>>> O que aquele mudança no código fez foi redefinir a função que o >>>>> "windowManager" utiliza internamente para centralizar a janela, ok? >>>>> >>>>> Vicente Maciel Junior >>>>> RiaBrazil - Senior Rich App Developer >>>>> Independent Web Developer & Consultant >>>>> Adobe Advanced Certified Developer >>>>> Adobe Certified Instructor (ColdFusion & Flash Platform) >>>>> +55 71 8120-0035 >>>>> MSN: macie...@gmail.com / Twitter: macieljr >>>>> http://www.riabrazil.com.br >>>>> http://teclandoalto.blogspot.com >>>>> Grupo de usuarios Oficial Adobe RIA-BA: http://bit.ly/ria-ba >>>>> >>>>> >>>>> 2009/4/16 Vagner Mendonça <vagner...@gmail.com> >>>>> >>>>>> Boa tarde >>>>>> windows seria o nome da minha janela...tipo eu criei como >>>>>> win_0004....depois naa função que chama a janela ficaria assim? >>>>>> >>>>>> public function center(window:MDIWindow):void >>>>>> { >>>>>> win_0004.x = this.container.width / 2 - win_0004.width /2; >>>>>> win_0004.y = this.container.height / 2 - win_0004.height /2; >>>>>> } >>>>>> >>>>>> *var* win_0004:Prog_0004 = *new* Prog_0004(); >>>>>> >>>>>> mdiCanvas.windowManager.add(win_0004); >>>>>> >>>>>> mdiCanvas.windowManager.addCenter(win_0004); >>>>>> >>>>>> seria isto??? >>>>>> >>>>>> obrigado >>>>>> 2009/4/16 Vicente Maciel Junior <macie...@gmail.com> >>>>>> >>>>>>> No Flexlib em: >>>>>>> >>>>>>> flexlib.mdi.managers.MDIManager.as<http://flexlib.mdi.managers.mdimanager.as/> >>>>>>> >>>>>>> Você vai encontrar o método: >>>>>>> >>>>>>> public function center(window:MDIWindow):void >>>>>>> { >>>>>>> window.x = this.container.width / 2 - window.width; >>>>>>> window.y = this.container.height / 2 - window.height; >>>>>>> } >>>>>>> >>>>>>> Altere para: >>>>>>> >>>>>>> public function center(window:MDIWindow):void >>>>>>> { >>>>>>> window.x = this.container.width / 2 - window.width /2; >>>>>>> window.y = this.container.height / 2 - window.height /2; >>>>>>> } >>>>>>> >>>>>>> Então o addCenter() vai funcionar centralizando normalmente. >>>>>>> >>>>>>> Vicente Maciel Junior >>>>>>> RiaBrazil - Senior Rich App Developer >>>>>>> Independent Web Developer & Consultant >>>>>>> Adobe Advanced Certified Developer >>>>>>> Adobe Certified Instructor (ColdFusion & Flash Platform) >>>>>>> +55 71 8120-0035 >>>>>>> MSN: macie...@gmail.com / Twitter: macieljr >>>>>>> http://www.riabrazil.com.br >>>>>>> http://teclandoalto.blogspot.com >>>>>>> Grupo de usuarios Oficial Adobe RIA-BA: http://bit.ly/ria-ba >>>>>>> >>>>>>> >>>>>>> 2009/4/16 Vagner Mendonça <vagner...@gmail.com> >>>>>>> >>>>>>> coloquei assim mais ele deu so uma movida..não centraliso total.. >>>>>>>> >>>>>>>> * >>>>>>>> >>>>>>>> var >>>>>>>> *win_0004:Prog_0004 = *new* Prog_0004(); >>>>>>>> >>>>>>>> mdiCanvas.windowManager.add(win_0004); >>>>>>>> >>>>>>>> mdiCanvas.windowManager.addCenter(win_0004); >>>>>>>> Tem alguma ideia que pode ser...? >>>>>>>> >>>>>>>> >>>>>>>> 2009/4/16 Alexandre Tavares Farias <fariasalexan...@gmail.com> >>>>>>>> >>>>>>>> Amigos bom dia, >>>>>>>>> Estou com o mesmo problema, fico no aguardo tambem.... >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Atenciosamente, >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> NET SOLUTIONS INFORMÁTICA >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> Alexandre Tavares Farias >>>>>>>>> Fortaleza - Ce >>>>>>>>> ------------------------------------------------------------- >>>>>>>>> www.netsolutions-ce.com.br >>>>>>>>> www.ns-ce.com.br >>>>>>>>> fariasalexan...@gmail.com >>>>>>>>> ------------------------------------------------------------- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2009/4/15 Beto <b...@webinovacoes.com.br> >>>>>>>>> >>>>>>>>>> >>>>>>>>>> DZ8 escreveu: >>>>>>>>>> > Galera to com um probleminha aqui em usar este tipo de recurso >>>>>>>>>> tenho >>>>>>>>>> > uma janela em mdi e nao tem jeito de centralizar. >>>>>>>>>> > para maximir e tranquilo e para centralizar ela com tamanho >>>>>>>>>> normal eu >>>>>>>>>> > usei mdicamvas.windowsmaneger.center(); mais não adianto, alguem >>>>>>>>>> tem >>>>>>>>>> > alguma ideia de como posso fazer isto....obrigado >>>>>>>>>> > > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Vagner, >>>>>>>>>> >>>>>>>>>> Tenta o seguinte: >>>>>>>>>> >>>>>>>>>> mdicanvas.addCenter(mdiWindow); >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Atenciosamente, >>>>>>>>>> >>>>>>>>>> Beto >>>>>>>>>> +55 61 4063.6303 | 61 8409.1775 >>>>>>>>>> Brasília - DF >>>>>>>>>> Web Inovações >>>>>>>>>> www.webinovacoes.com.br >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ Você recebeu esta mensagem porque está inscrito na lista "flexdev" Para enviar uma mensagem, envie um e-mail para flexdev@googlegroups.com Para sair da lista, envie um email em branco para flexdev-unsubscr...@googlegroups.com Mais opções estão disponíveis em http://groups.google.com/group/flexdev -~----------~----~----~----~------~----~------~--~---