Comunidad de diseño web y desarrollo en internet online

Paginacion en Flex

Citar            
MensajeEscrito el 31 May 2008 06:31 pm
Hola amigos necesito por favor una paginacion para mis paginas flex , les agradeceria mucho si me ayudan .

Por pchavez

18 de clabLevel



 

msie
Citar            
MensajeEscrito el 01 Jun 2008 03:31 am
Puedes usar un tabBar e ir agregando pestañas, o directamente agregando botones en un contenedor. Aquí por ejemplo una función que agrega botones, que ilustra el concepto (pages es un canvas):

Código :

public function makePages(cant:Number):void {
           for(var c:Number=pages.numChildren-1; c>=0; c--) pages.removeChildAt(c)
           var page:Number = 1
           var count:Number = 0
           if(cant<=pageSize) return
           t = pages.addChild(new Button)
             t.width = 20
             t.height = 20
         t.label = "1"
             t.data = "0"
             t.enabled = false
             t.styleName ="myButton"
             t.setStyle("fillColors", new Array(buttonsSelected, buttonsBase))
             t.addEventListener(MouseEvent.CLICK, showPage)
             for(c=0; c<cant; c++){
              if(++count%pageSize==0) {
                 t = pages.addChild(new Button)
                 t.width = 20
                 t.height = 20
                 t.x = page*t.width
                 t.label = ++page                 
                 t.data = count
                 t.enabled = false
                 t.styleName ="myButton"
                 t.addEventListener(MouseEvent.CLICK, showPage)
              }
             }
             var diff:Number = pages.width - (t.x + t.width)
             for(c=0; c<pages.numChildren; c++) pages.getChildAt(c).x+=diff
        }
        


Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.